Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: How Can I get A sequence Current Value in PROC
Does anyone know why Oracle forces you to use NEXTVAL before doing CURRVAL. I would think sometimes you would want to use CURRVAL without incrementing sequence first.
Thanks
Rick
-----Original Message-----
Sent: Monday, November 26, 2001 8:50 AM
To: Multiple recipients of list ORACLE-L
You can use another pseducolumn CURRVAL but you must use at least once per session the NEXTVAL before using the CURRVAL or else you would get the ORA-08002 error.
...
SELECT <your_sequence>.CURRVAL INTO <your_variable> FROM dual;
...
HTH
Iulian
-----Original Message-----
Sent: Monday, November 26, 2001 2:50 PM
To: Multiple recipients of list ORACLE-L
Hi
when writing a program PROC <sequenceName>.NEXTVAL points to the next value of a sequence, is there anything like <sequenceName>.SOMETHING that returns current value of sequence.
Thanks
E.
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
INET: Iulian.ILIES_at_mobil-rom.com
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Mon Nov 26 2001 - 08:44:40 CST
![]() |
![]() |