Thanks for the question, Hariprasad.
Asked: May 22, 2024 - 4:01 am UTC
Last updated: May 23, 2024 - 2:48 am UTC
Version: 19C
Viewed 1000+ times
SQL> declare 2 cursor cur_collection_detail is 3 select rowid,ename, empno from scott.emp; 4 begin 5 for dtl in cur_collection_detail loop 6 dbms_output.put_line('Test inprogress..'); 7 end loop; 8 end; 9 / PL/SQL procedure successfully completed. SQL> declare 2 cursor cur_collection_detail is 3 select rowid,ename, empno from scott.emp; 4 5 type tlist is table of cur_collection_detail%rowtype; 6 r tlist; 7 begin 8 open cur_collection_detail ; 9 fetch cur_collection_detail bulk collect into r; 10 close cur_collection_detail; 11 end; 12 / PL/SQL procedure successfully completed.
Gh, May 24, 2024 - 7:49 pm UTC
Check out more PL/SQL tutorials on our LiveSQL tool.
PL/SQL reference manual from the Oracle documentation library