Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stored Procedures that Return Result Sets

Status
Not open for further replies.

shammack

Programmer
Mar 4, 2002
25
US
How does one write an Oracle stored procedure that returns a result set? Can anyone provide a brief example?
 

You can make use of REFCURSOR in Oracle. I am sure there are white papers with examples out there. Robbie

"The rule is, not to besiege walled cities if it can possibly be avoided" -- Art of War
 
this is the simplest form of ref cursor.

variable x refcursor

begin
open :x for select * from emp;
end;
/

print x
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top