Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Return Value for a stored procedure
You can use an out parameter in a stored procedure. It is a bad idea to
commit in a procedure. (doable, just do commit;) You should have the caller
do the commit. Otherwise, if you need to move the transaction boundary you
have to edit the stored proc instead of doing it outside the procedure. Or
if you need to chain them together you can't rollback if one in the middle
has a commit; Additionally, you should use the error mechanism to raise
errors not a return value.
Jim
"Florian Marinoiu" <x_at_x.com> wrote in message
news:3F9718E6.D8C03D67_at_x.com...
> Hi,
>
> In MSSQL Server developement I used the return value of a stored
> procedure to test for different things.
>
> Is it a similar mechanism in ORACLE 8.1
>
> Let's say that in a procedure after the commit I do a RETURN 0 and if an
> error occurs in the exception section I do a RETURN -1..
>
>
> Thanks,
> Florian
>
Received on Wed Oct 22 2003 - 20:34:10 CDT