Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do I declare a procedure that returns a recordset?

539442Nov 20 2006 — edited Nov 20 2006
I have to use a procedure that returns me a recordset.
On SQL server I would use

CREATE PROCEDURE proc_name
AS
BEGIN
select * from table
END

or

CREATE PROCEDURE proc_name
AS
BEGIN
DECLARE @temp TABLE (a,b,c,...)
INSERT INTO @temp
select * from @temp
END

Also, can I work with a temporary table as I used on MSSQL?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 18 2006
Added on Nov 20 2006
17 comments
1,122 views