create or replace procedure test(table_name in varchar2)
as
type mycursor is ref cursor;
cursor_tbname mycursor;
sqlstr varchar2(500);
begin
sqlstr := 'select * from '||table_name;
open cursor_tbname for sqlstr;
close cursor_tbname;
end;
/
as
type mycursor is ref cursor;
cursor_tbname mycursor;
sqlstr varchar2(500);
begin
sqlstr := 'select * from '||table_name;
open cursor_tbname for sqlstr;
close cursor_tbname;
end;
/
as
v_sql varchar2(1000);
v_temp varchar2(50);
begin
v_sql :='select col from '||v_table;
execute immediate v_sql into v_temp;
end;
str:='select * from '||tablename;
execute immediate str;