I have a procedure where I am using %TYPE to declare my variable. As of now its working for only one table i.e. EMPLOYEES:
CREATE OR REPLACE PROCEDURE MYPROCEDURE
DECLARE
filed2 EMPLOYEES.name%TYPE;
END;
Now I want to extent it for others table which have same few common tables. So I will pass the table name as parameter. Here how can use the TYPE syntax because table name is in variable. If I am trying this:
CREATE OR REPLACE PROCEDURE MYPROCEDURE (myTable IN VARCHAR2)
DECLARE
filed2 myTable.name%TYPE;
END;
I am getting an error. How can I achieve it?