SQL Language (MOSC)

MOSC Banner

Reset Sequence value

edited Apr 19, 2012 2:55AM in SQL Language (MOSC) 3 comments
I have the below script and unable to reset the value . Can somebody fix it...
--@C:\set_sequence_value.sql
set echo off
set heading off
set feedback off
set verify off

undefine SEQ_NAME
undefine NEW_VALUE
undefine OWNER
column passout noprint new_value incby

acc SEQ_NAME CHAR PROMPT 'ENTER SEQUENCE NAME with period :'
acc OWNER CHAR PROMPT 'ENTER SEQUENCE OWNER:'
select rtrim(increment_by) passout from all_sequences where sequence_name=upper('&&SEQ_NAME');

define incb = '&incby'

SELECT 'Current Value is:' || last_number FROM all_sequences where sequence_name=upper('&&SEQ_NAME');

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center