Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to: Retrieve Sequence.NEXTVAL into a variable
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