Tuesday, April 1, 2008

Oracle > Edit Sequences last value



Q : How do we set the LASTVALUE value in an Oracle Sequence?
You can change the LASTVALUE for an Oracle sequence, by executing an ALTER SEQUENCE A : command.


seq.last_number = 10 , Set seq.last_number = 15


alter sequence NXG_ORD.seq_name increment by 4;


select NXG_ORD.seq_name .nextval from dual;


ALTER SEQUENCE NXG_ORD.seq_name increment by 1;


Now, the next value to be served by the sequence will be 16.

No comments: