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: How to return a record set from Stored Proc?

Re: How to return a record set from Stored Proc?

From: Jim Kennedy <kennedy-family_at_attbi.com>
Date: Fri, 04 Jan 2002 02:07:58 GMT
Message-ID: <188Z7.2052$B85.25177@rwcrnsc53>


Search the news group. There are hundreds of simple examples. Jim
"Bill Han" <billxhan_at_hotmail.com> wrote in message news:GB7Z7.20629$DO.2654967_at_news1.calgary.shaw.ca...
> Greeting all,
>
> How can I return a record set from a Oracle stored procedure? I was heard
> the term REF CURSOR (?) somewhere for this purpose. What's that? How to
use
> it?
>
> Can someone write a simple code to demonstrate how to do that? I
appreciate
> it!
>
> Let's say I have a sp as follows:
>
> CREATE OR REPLACE PROCEDURE my_proc
> ( p_dept_id IN NUMBER) AS
> BEGIN
> SELECT * FROM EMP WHERE dept_id = p_dept_id
> END
>
> How to change that in order to return a record set to the caller (VB,
ADO)?
>
> Thanks,
> Bill Han
>
>
>
>
>
>
>
Received on Thu Jan 03 2002 - 20:07:58 CST

Original text of this message

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