SQL> create or replace package pkg_table_collect as
2 type table_cursor is ref cursor;
3 end;
4 /
SQL> create or replace procedure sp_table_collect(tb_name in varchar2, collect_cursor out pkg_table_collect.table_cursor) is
2 v_sql varchar2(1000);
3 begin
4 v_sql := 'select * from ' || tb_name;
5 open collect_cursor for v_sql;
6 close collect_cursor;
7 end;
8 /
Procedure created

2 type table_cursor is ref cursor;
3 end;
4 /
SQL> create or replace procedure sp_table_collect(tb_name in varchar2, collect_cursor out pkg_table_collect.table_cursor) is
2 v_sql varchar2(1000);
3 begin
4 v_sql := 'select * from ' || tb_name;
5 open collect_cursor for v_sql;
6 close collect_cursor;
7 end;
8 /
Procedure created
