Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Procedure fo a new sequence value
Jaap Severein wrote
>CREATE procedure NewVolgNumr( NewKey out number )
>is begin
> NewKey := volgnumr.nextval;
>end;
Nextval is a pseudo column, which you can only use in a query. So, you should use
create procedure ... as
begin
select volgnumr.nextval into NewKey from dual;
I am not complety sure if select into an out parameter is allowed. If not, then use an extra variable to store the result and assign this to NewKey.
Arjan. Received on Wed Mar 03 1999 - 15:47:32 CST