Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: sequenceS REPLICATION
Let say you want you sequence to be 1000, so you do it by alter sequence:
spool inc_seq.sql
select 'alter sequence myseq increment by '
|| 1000 - currval.myseq || ';' from dual;
select 'select nextval.myseq from dual;' from dual;
select 'alter sequence myseq increment by 1;' from dual;
spool off
@inc_seq.sql
Do not forget all the set option off you need to get clean script in the sql file. Also do some testing because I am sure there should be -1 somewhere in the first alter sequence.
you can also drop the sequence and simply build a new one with MINVALUE 1000.
Yechiel Adar
Mehish
-- http://www.freelists.org/webpage/oracle-lReceived on Mon Oct 11 2004 - 13:32:16 CDT
![]() |
![]() |