Home » SQL & PL/SQL » SQL & PL/SQL » Help with retrieving a recordset
Help with retrieving a recordset [message #2822] Thu, 15 August 2002 05:15 Go to next message
Brian
Messages: 38
Registered: October 1999
Member
I am new to Oracle and PL/SQL, I usually use SQL Server, can anyone tell me what is the simplest way (using a stored procedure) to select all records from a table and pass the entire recordset back to the calling application.

Example: in SQL Server I would use something like:

CREATE PROCEDURE usp_SelStuff
AS
SELECT * FROM MyTable
GO

Nice and simple, but I can't seem to do this with PL/SQL. I am using PL/SQL Developer and Oracle 8i
What is the equivelant in PL/SQL Procedure ?
Thanks in advance for your help
Re: Help with retrieving a recordset [message #2829 is a reply to message #2822] Thu, 15 August 2002 09:03 Go to previous messageGo to next message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
Here's a great overview of returning result sets from procedures using ref cursors:

http://osi.oracle.com/~tkyte/ResultSets/index.html
Re: Help with retrieving a recordset [message #2842 is a reply to message #2829] Fri, 16 August 2002 06:23 Go to previous message
Brian
Messages: 38
Registered: October 1999
Member
Thank you very much for your help, I've actually manged to compile the thing at last. I guess I should now look into some 'Proper' training on this stuff :)

Thank again for your time and patience.

Brian
Previous Topic: import and export
Next Topic: Updating a clob
Goto Forum:
  


Current Time: Thu Apr 25 20:10:53 CDT 2024