I am creating a dynamic cursor, and I would like to iterate over the columns existing in the cursor. How can I do it?
For instance:
create or replace procedure dynamic_cursor(empid in varchar2, RC IN OUT sys_refcursor) as stmt varchar2(100); begin stmt := 'select * from employees where id = ' || empid; open RC for stmt using val; for each {{COLUMN OR SOMETHING}} --TODO: Get this to work loop; end;
source share