Re: How to so select on sequence ?
From: Randy Dewoolfson <randyd_at_cais.cais.com>
Date: 1996/09/22
Message-ID: <523uui$2g7_at_news2.cais.com>#1/1
Date: 1996/09/22
Message-ID: <523uui$2g7_at_news2.cais.com>#1/1
Try something like this:
SELECT seq.nextval FROM dual;
hope it helps.
Randy :)
Shinu Gupta (shinu_at_openix.com) wrote:
: Hi:
: I am rather new to Oracle. I am currently using sequences for generating unique
: numbers. I am able to use seq.nextval and seq.currval successfully in insert
: and update statements.
: I want to do a select on the sequence, increment the value and save the value
: in a variable. The book says that I can do select on a sequence - but i can't
: figure out how.
: select nextVal from seq
: fails.
: Shinu Gupta
-- ..uu. ---------------------- .?$" '?i . I Randy DeWoolfson I .T^M ._at_" d9 . f ,.un. b, i I--------------------I " Z :#" M `8 U < .dP"``"# `M _at_" I randyd_at_cais.com I &H?` Xl _R $5. $ ?* _at_ 'P,#" I--------------------I ,d#^*L :RP'~$b f`$L:M Xf .f' dH` I ,\//. I & 'M ,P `E M "$ Mux~ n!` I |o o| I dk `h" ' j " y" *~ I====oOO==(_)==Ooo===IReceived on Sun Sep 22 1996 - 00:00:00 CEST