首页 > 其他 > 详细

游标的使用

时间:2016-06-15 21:59:48      阅读:144      评论:0      收藏:0      [点我收藏+]

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;

游标的使用

原文:http://www.cnblogs.com/empty01/p/5588852.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!