Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to create Stored Procedure to return rows
Here is how I do it. Run script 1 first, then script 2.
SCRIPT 1:
create or replace package getequipment
as
type return_cursor is ref cursor;
procedure allequipment
(return_results OUT return_cursor);
End getequipment
;
/
SCRIPT 2:
create or replace package body getequipment
as
procedure allequipment
(return_results OUT return_cursor)
is
BEGIN
open return_results for
select * from equipment;
END;
END;
/
Bill <haha666_at_writeme.com> wrote in message
news:3abd6a58_at_newsgate.imsbiz.com...
> Dear All,
>
> I'm a newbie in Oracle and want to create a stored procedure to return
rows
> just as "Select * from equipment".
>
> Could anyone kindly give me the sample script or for it?
>
> Do I need to use PL/SQL and PACKAGE?
>
> Regards,
>
> Bill
> kwlau_at_writeme.com
>
>
>
Received on Sun Mar 25 2001 - 09:01:06 CST
![]() |
![]() |