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: Billy Verreynne <vslabs_at_onwe.co.za>
Date: 1997/10/03
Message-ID: <01bccfff$8cd65c80$ba030059@billyv.vslabs.co.za>#1/1

Tom Mettling <mettling_at_volpe.dot.gov> wrote in article <3432686E.B4833DB0_at_volpe.dot.gov>...
> 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;

I think you're missing the point Tim. In SQL-Server a stored proc can contain a single SELECT statement, e.g.
CREATE PROCEDURE xyz AS
BEGIN
  SELECT * FROM foobar
END This stored proc behaves exactly like a normal SQL SELECT statement in SQL-Server. The advantages are that the SELECTs (query logic) for an application reside on the server, and that instead of sending a long SELECT statement across the network, only the stored proc name is transmitted by the client.

This is not possible with Oracle, without using something like Oracle OLE objects.

regards,
Billy Received on Fri Oct 03 1997 - 00:00:00 CDT

Original text of this message

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