Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

select test_seq.currval from dual;

fsze88hohoSep 1 2008 — edited Sep 1 2008
Hi,
I want to get the value of current value of sequence, as I know if the sequence havn't select nextval once, I can't get the value of currval. May I have another method like to get the minvalue or start with value from the sequence?

SQL> CREATE SEQUENCE TEST_SEQ MINVALUE 10 MAXVALUE 999999999999999999999999999
INCREMENT BY 1 START WITH 10 NOCACHE NOORDER NOCYCLE ;

已建立序列.

SQL> select test_seq.currval from dual;
select test_seq.currval from dual
*
ERROR 在行 1:
ORA-08002: 尚未在此階段作業中定義順序 TEST_SEQ.CURRVAL

Thanks for your helps
Francis
This post has been answered by JustinCave on Sep 1 2008
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 29 2008
Added on Sep 1 2008
10 comments
7,333 views