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

Re: How to: Retrieve Sequence.NEXTVAL into a variable

From: Kostya Ogrodnichy <kostya_at_kpvti.kiev.ua>
Date: Fri, 13 Nov 1998 15:31:44 +0200
Message-ID: <910963859.163718@ns.kpvti.kiev.ua>

select MySequence.nextval into MyVar from dual;

read documentation

Hugh Pendry wrote in message <72h6rr$7o7$1_at_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 - 07:31:44 CST

Original text of this message

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