Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to return a record set from Stored Proc?
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
![]() |
![]() |