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!

procedure with table type out parameter

914418Jan 31 2012 — edited Feb 1 2012
Hi,

I need to create a procedure which gives back a content of a table as an out parameter.

i have tried something like below code
it might not be correct since i am writing from home and cannot access any oracle db right now



create or replace procedure test (
table_out test_table%rowtype
) as

type table_out test_table%rowtype

begin

select * into table_out
from test_table
where country = 'HUN';

end;


compile doesnt gives error, but when running it i get error

declare
table_out test_table%rowtype
begin
test( table_out );
dbms_output.put_line( table_out );
end;


but it fails, could you help how to solve the above problem and call the proc correctly?
thanks in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 29 2012
Added on Jan 31 2012
11 comments
8,658 views