| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to: retrieve Sequence.NEXTVAL to a variable?
Try
select MySequence.nextVal into MyVar FROM DUAL ;
Hugh Pendry (hpendry_at_trinitech.co.uk) wrote:
: 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.
--
While Alcatel may claim ownership of all my ideas (on or off the job),
Alcatel does not claim any responsibility for them. Warranty expired when u
opened this article and I will not be responsible for its contents or use.
Received on Fri Nov 13 1998 - 06:40:31 CST
![]() |
![]() |