一则测试 cursor fetch之前与之后状态的过程:
declare
new_val number;
cursor ss is select rownum from emp;
begin
open ss;
dbms_output.put_line('begin fetch ----> ');
dbms_output.put_line(' result ='||
case when ss%notfound then 'false'
when ss%found then 'true'
else 'null' end);
fetch ss into new_val;
dbms_output.put_line('after fetch ----> ');
dbms_output.put_line(' result ='||
case when ss%notfound then 'false'
when ss%found then 'true'
else 'null' end);
close ss;
end;
/
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24465008/viewspace-708785/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/24465008/viewspace-708785/