I have a nested table variable that holds all the column names of a table. I am trying to get the data into the record dynamically and pass it to an insert statement.
For example -
DECLARE
v_table is table of varchar2(100);
BEGIN
--This v_table has all the column names of a particular table.
FOR I in 1..v_table.count
loop
INSERT INTO emp1(v_table(I)) values(123);
end loop;
END;
Apparently I am unable to pass the v_table(I) in the column list of insert command. Is there a way to pass the column names dynamically ?