Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Assign Procedure OUT parameter to a variable?
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