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: Getting recordset from stored procedure

Re: Getting recordset from stored procedure

From: Keith Boulton <boulkenospam_at_globalnet.co.uk>
Date: Thu, 28 May 1998 10:39:59 GMT
Message-ID: <356d358d.926591@read.news.global.net.uk>


On Wed, 27 May 1998 02:38:27 GMT, nobody_at_nowhere.com (Nobody) wrote:

>I am a seasoned SQL Server stored procedure programmer. But in Oracle,
>is there a way to return record sets from a stored procedure? I wish
>to do something like this:
>
>create procedure get_data
>as
>begin
> select * from emp;
>end;
>/
>

The short answer is no, unless your development tool can accept a cursor variable.

In any case, there is no particular reason to do this. As I understand it, the reason for doing this in SQLServer is for performance because the access path is compiled into the procedure. In Oracle, any sql statement has its access path determined the first time it is used since the database was started. Subsequent uses of the same statement by the same or different users will not re-evaluate the access path.

If your intention is to code the logic for record filtering in the database instead of your application, you can probably use a view instead. Received on Thu May 28 1998 - 05:39:59 CDT

Original text of this message

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