wizard2000
asked on
nested cursor loops
I have a problem in that i need to create a nested loop in PL/SQL. I basically need to use information from the first loop which uses a cursor to select information in the second loop, which also uses a cursor. As it stands i can not get it working. Any help would be appreciated, especially examples.
Cheers
Cheers
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
BEGIN
FOR rec1 IN (SELECT table_name FROM user_tables) LOOP
FOR rec2 IN (SELECT column_name FROM user_tab_columns WHERE table_name = rec1.table_name AND column_id = 1) LOOP
DBMS_OUTPUT.put_line(rec2.
END LOOP;
END LOOP;
END;
If you have any particular problems, perhaps we could help you with them?