Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: First Oracle Stored Procedure :::
khurram.khan_at_qict.net (Khurram Khan) wrote in message news:<a23090a4.0112252314.44160654_at_posting.google.com>...
> We have a very simple requirement where user will provide Part # and
> in return of that we will pass Part Name, Owner Name, Part Size etc.
>
> We can easily write SQL query to achieve required results but at this
> time we are required to write Oracle stored procedure and we have
> never written stored procedure before therefore please advice what
> need to be changed in mentioned SQL query to convert it into stored
> procedure.
>
Create or Replace proc A(Id In Number, Name out Varchar2, Owner out
Varchar2, Size Ou Varchar2)
As
Select Part_name,Owner_name,Part_size
into name, owner,size
from Part_detail Pa, OWN_Deatil OD
where Pa.Part_id = id
and Pa.Part_id = OD.Part_id;
End;
HTH... My 2 cents ... read the application developers guide to understand more about PL/SQL...
Regards,
Ganesh R
Received on Wed Dec 26 2001 - 04:17:13 CST