Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Assign Procedure OUT parameter to a variable?

Re: Assign Procedure OUT parameter to a variable?

From: Martin Drautzburg <drautzburg_at_altavista.net>
Date: 03 Apr 2001 23:13:34 +0200
Message-ID: <87n19xk7pd.fsf@beaureve.i-did-not-set--mail-host-address--so-shoot-me>

april.mcclellan_at_HydroOne.com writes:

> Is it possible to assign the OUT parameter of a procedure to a variable?
> I have tried the following:
>
> v_BidNo := SPINSERTBIDNO;

This would have to be a FUNCTION. In PL/SQL you can have a procedure with out parameters or a function return values. You could have

function sin (x number) return number
or
procedure sin (x number, y out number)

you would call the functions as
y := sin(x);

and you would call the procedure as
sin(x,y)M

As opposed to C you HAVE to assign the return value of a function to a variable, i.e. you cannot call the function as just sin(x), which would be possible in C (though nonsensical). Thus the difference between a function and a procedure is mere syntactic sugar in PL/SQL, wheras there IS a difference in C.

hope this helps
Martin Received on Tue Apr 03 2001 - 16:13:34 CDT

Original text of this message

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