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: Procedure fo a new sequence value

Re: Procedure fo a new sequence value

From: Arjan van Bentem <avbentem_at_DONT-YOU-DAREdds.nl>
Date: Wed, 3 Mar 1999 22:47:32 +0100
Message-ID: <36ddadfc$0$28571@newton>


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;

    end;

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

Original text of this message

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