How can I define Collections in PL/SQL with variables?
Eg.
v_owner varchar(128) := 'SCHEMA_USER';
v_tablename varchar(128) := 'TABLENAME';
TYPE t_tab IS TABLE OF SCHEMA_USER.TABLENAME%ROWTYPE;
v_tab t_tab;
What I want is to use the variables instead of the names of the owner/table. Something like that:
TYPE t_tab IS TABLE OF v_owner.v_tablename%ROWTYPE;
But that does not work of course.
Any idea?