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;
/