Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

REF CURSOR in a cursor FOR LOOP

862489Oct 9 2012 — edited Oct 9 2012
declare
TYPE typ_name is ref cursor;
V_ref_cur typ_name;
CURSOR c1 is SELECT col1,col2 from table_name1;

BEGIN

for i in C1
Loop
Open v_ref_cur for

select * from table_name2;
end loop;

END;

Pls let me know if it is possible to open/use ref cursor inside a cursor for loop?


Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 6 2012
Added on Oct 9 2012
11 comments
34,305 views