Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Sqlplus Question
In article <6m68ld$1ij$3_at_trotsky.cig.mot.com>, weiss_at_cig.mot.com (Phill
Weiss) wrote:
>Is it possible to make a sqlplus query for the nextval of a sequence in one
>query, store the result in a variable, and use the variable in a subsequent
>sqlplus query? I don't want to have to use pl/sql to do this, only sqlplus.
>If this is possible, please enlighten me as to how I can go about it. Thanks.
Phill;
Use "currval" from the sequnce. This will return the current value of the
sequence afer "nextval" is used in the session.
HTH
James
--
lorenzen_at_tiny.net | Life is complex; it has | real and imaginary partsReceived on Tue Jun 16 1998 - 13:31:59 CDT