Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Stored Proc Question

Re: Stored Proc Question

From: Tom Mettling <mettling_at_volpe.dot.gov>
Date: 1997/10/01
Message-ID: <3432686E.B4833DB0@volpe.dot.gov>#1/1

Oracle stored procedures CAN return multiple rows. You can do it with a cursor or with a table variable. The cursor method is the easiest:

procedure xyz
is
cursor abc is select * from tablename;
begin

for i in abc loop

    do whatever you want in here it does an implicit fetch on the records in the cursor
end loop;

end xyz;

Steve Kerns wrote:

> A small problem exist with this scheme. Oracle stored procedures
> cannot
> return
> multiple rows. This is a feature that Sybase has but Oracle doesn't
> and
> I miss it.
>
> I think a view would work better in this case.The view gets the owners
>
> permissions and
> the view's user get the permission assigned by the owner.
>
> Steve
>
> Mark DeWaard wrote:
>
> > <stuff deleted>
> > - Use a different login id and password using PL/SQL connect command
 

> > This allows the user to have different rights than his/her login
 id
> > - send back the results of a select query with a variable for the
> > where
> > clause
> > <stuff deleted>
> >

--
Tom Mettling
W.T. Chen & Company, Inc.
mettlingt_at_wtchen.com
Received on Wed Oct 01 1997 - 00:00:00 CDT

Original text of this message

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