declare
cur_book readerinfo%rowtype;
begin
select * into cur_book from readerinfo where readerid=9701;
if sql%isopen then
dbms_output.put_line ('isopen属性为true');
else
dbms_output.put_line ('isopen属性为false');
end if;
if sql%found then
dbms_output.put_line('%found为true');
end if;
update readerinfo set sex ='nv' where sex='男';
dbms_output.put_line('修改脚本记录数:' || sql%rowcount);
rollback;
exception ---异常处理部分
when no_data_found then
dbms_output.put_line(sql%rowcount);
end;