打开APP
未登录
开通VIP,畅享免费电子书等14项超值服
开通VIP
首页
好书
留言交流
下载APP
联系客服
最佳游标例子
A_POST
>《oracle》
2013.10.31
关注
create or replace procedure proccycle(p varchar2)
as
cursor c_postype is select pos_type, description from pos_type_tbl where rownum <
6
;
v_postype varchar2(
20
);
v_description varchar2(
50
);
begin
open c_postype;
if
c_postype%found then
dbms_output.put_line(
'found true'
);
elsif c_postype%found =
false
then
dbms_output.put_line(
'found false'
);
else
dbms_output.put_line(
'found null'
);
end
if
;
loop
fetch c_postype into v_postype,v_description ;
exit when c_postype%notfound;
dbms_output.put_line(
'postype:'
||v_postype||
',description:'
||v_description);
end loop;
close c_postype;
dbms_output.put_line(
'---loop end---'
);
open c_postype;
fetch c_postype into v_postype,v_description;
while
c_postype%found loop
dbms_output.put_line(
'postype:'
||v_postype||
',description:'
||v_description);
fetch c_postype into v_postype,v_description ;
end loop;
close c_postype;
dbms_output.put_line(
'---while end---'
);
for
v_pos in c_postype loop
v_postype := v_pos.pos_type;
v_description := v_pos.description;
dbms_output.put_line(
'postype:'
||v_postype||
',description:'
||v_description);
end loop;
dbms_output.put_line(
'---for end---'
);
end;
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报
。
打开APP,阅读全文并永久保存
查看更多类似文章
猜你喜欢
类似文章
【热】
打开小程序,算一算2024你的财运
Oracle存储过程总结
Oracle游标使用大全(二)
Oracle笔记 九、PL/SQL 游标的使用
oracle使用六(游标管理)
几种游标的用法
Oracle Cursor的使用
更多类似文章 >>
生活服务
热点新闻
留言交流
回顶部
联系我们
分享
收藏
点击这里,查看已保存的文章
导长图
关注
一键复制
下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!
联系客服
微信登录中...
请勿关闭此页面
先别划走!
送你5元优惠券,购买VIP限时立减!
5
元
优惠券
优惠券还有
10:00
过期
马上使用
×