Lesson 2: open / fetch..into / %NOTFOUND / close
open cursor3;
loop
fetch cursor3 into record_var2;
exit when cursor3%NOTFOUND
-- do something with record_var2
end loop;
close cursor3;
Lesson 99:
declare/ %ROWTYPE / open / fetch..into/ %NOTFOUND / close
For a simple yet complete sample code, combine the last sample in this post and the previous post.