--创建过程,參数为sys_refcursor,为out型 create or replace procedure aabbsys_refcursor(o out sys_refcursor) is begin open o for select * from basplumain; end; --- --測试过程,使用aabbsys_refcursor传出的值 create or replace procedure aabb_test_sys_refcursor(return out int)is type t_basplumain is table of basplumain%rowtype; t_plu t_basplumain; v sys_refcursor; begin aabbsys_refcursor(v); fetch v bulk collect into t_plu; for i in 1..t_plu.count loop dbms_output.put_line(t_plu(i).pluname); end loop; end; --- --sqlplus測试脚本 --set serveroutput on declare v_return int default 0; begin aabb_test_sys_refcursor(v_return); end;
sys_refcursor的使用方法实例
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
上一篇:Mustache 使用心得总结
下一篇:Hibernate的fetch
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
谷歌地图数据采集软件使用方法
专为做外贸的朋友开发的一款基于谷歌地图数据采集的软件,可以采集任意国家、任意地区的公司地址、电话号码、邮件地址等数据。
谷歌地图 谷歌地图数据采集软件 谷歌地图数据采集 谷歌地图数据采集器