码迷,mamicode.com
首页 > 其他好文 > 详细

游标的使用

时间:2016-06-15 22:03:00      阅读:127      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!