Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Any way to get seq.currval without using nextval?

Any way to get seq.currval without using nextval?

From: Gene Hubert <gwhubert_at_hotmail.com>
Date: 8 Oct 2001 05:44:33 -0700
Message-ID: <7e3fa619.0110080444.7f203d9d@posting.google.com>


I know this is rather petty but it vexes me to burn a sequence number to find out the current value of a sequence as in:

SQL> select myseq.currval from dual;
ERROR:
ORA-08002: sequence MYSEQ.CURRVAL is not yet defined in this session

ORA-08002 sequence string.CURRVAL is not yet defined in this session Cause: Sequence CURRVAL has been selected before sequence NEXTVAL. Action: Select NEXTVAL from the sequence before selecting CURRVAL.

Is there any way around this or am I forever vexed?

Thanks,
Gene Hubert
Durham, NC Received on Mon Oct 08 2001 - 07:44:33 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US