Quote:
create sequence s;
select s.nextval from dual;
select s.currval from dual;
select last_number FROM ALL_SEQUENCES Where Sequence_name='S'; |
And just in case the lazy one is too lazy to perform a simple test, I
post the results here:
SQL> CREATE SEQUENCE s;
Sequence created.
SQL> SELECT s.NEXTVAL FROM dual;
NEXTVAL
----------
1
SQL> SELECT s.CURRVAL FROM dual;
CURRVAL
----------
1
SQL> SELECT last_number FROM all_sequences WHERE sequence_name='S';
LAST_NUMBER
-----------
21
Cheers,
Brian
--
================================================== =================
Brian Peasland
oracle_dba (AT) nospam (DOT) peasland.net
http://www.peasland.net
Remove the "nospam." from the email address to email me.
"I can give it to you cheap, quick, and good.
Now pick two out of the three" - Unknown