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: How to create Stored Procedure to return rows

Re: How to create Stored Procedure to return rows

From: Scott Murray <smurray_at_murraycom.com>
Date: Sun, 25 Mar 2001 10:01:06 -0500
Message-ID: <ANxv6.333$tG3.24521@news1.atl>

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

Original text of this message

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