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 -> How to: Retrieve Sequence.NEXTVAL into a variable

How to: Retrieve Sequence.NEXTVAL into a variable

From: Hugh Pendry <hpendry_at_trinitech.co.uk>
Date: Fri, 13 Nov 1998 11:55:43 -0000
Message-ID: <72h6rr$7o7$1@trinitech.demon.co.uk>


Does anyone know how to retrieve the next value (or current value) a sequence into a variable in a stored procedure. I have tried various things including:-

function x
(

...

)
return ...
is

    MyVar integer
begin

    select MySequence.nextVal into MyVar;
...

end;

But have had no luck getting anything to work.

Thanks in advance
hugh. Received on Fri Nov 13 1998 - 05:55:43 CST

Original text of this message

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