To create a simple sequence
create sequence {sequence name}
start with {starting value}
increment by {increment of};
E.g.
create sequence seq_stu_no
start with 1
increment by 1;
Check the current value in sequence
select seq_stu_no.currval
from dual;
Check the next value in sequence
select seq_stu_no.nextval
from dual;
No comments:
Post a Comment