sys_refcursor的使用方法实例
2014-10-04 14:09
375 查看
--创建过程,參数为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;
相关文章推荐
- Oracle 参照游标(SYS_REFCURSOR)使用
- Ibatis 中使用存储过程以及sys_refcursor 返回结果
- sys_refcursor的使用(oracle自定义游标)
- 测试REF_CCURSOR和SYS_CURSOR的区别、自治事务Autonomous Transaction的使用、BULK COLLECTION INTO 和 FORALL语句的使用
- oracle 存储过程返回 结果集 table形式 (使用sys_refcursor 及程序包package 两种方式)
- sys_refcursor的用法实例
- 使用sys_refcursor和临时表返回oracle结果集
- JNDI的使用方法及实例
- 在Asp.Net中使用SmtpMail发送邮件的方法:实例
- 在Crystal Report 8中调用Oracle的procedure储存过程,并取得返回的类型为Sys_Refcursor数据表
- 利用ref cursor返回结果集的几种方法探讨
- 实例解说Linux中fdisk分区使用方法
- C#中综合使用字段,属性和方法的实例
- 实例解说 fdisk 使用方法
- XStream使用方法总结附实例代码
- 在asp.net中使用ajax时出现的"'Sys' 未定义"的解决方法
- 文件系统管理 之 实例解说 fdisk 使用方法
- ADO.NET 的最全实例,Ado.Net最佳使用方法 ADO.NET 的最佳实践技巧 (转载)
- 实例解说 fdisk 使用方法
- Ibatis 中怎样使用 Oracle Ref Cursor