Oracle Ref Cursor的使用,以及返回记录数
2010-08-11 14:18
387 查看
可以通过下列代码了解Ref Cursor的使用,但是能得到返回的记录数吗?我现在以我这几天的研究的水平告诉大家,不行, 只有两个方法可以实现,1.循环两次游标,2.或者通过count(1) over ()添加一列,来得到返回的数据记录数。我觉得可能后者会更好,前者太笨了。 希望后续版本能改善这个问题。 declare type refcursor is ref cursor; --ref游标类型 infolist refcursor; --集合 customer bi_customer%rowtype; --行 customercode bi_customer.customercode%type;--字段 customername bi_customer.corporation%type; begin open infolist for select bi.* from bi_customer cf; --全部 loop fetch infolist into customer; exit when infolist%notfound; dbms_output.put_line('客户编号为;:'||''||customer.customercode||', 地址为:'||customer.address ); end loop; close infolist; end;
相关文章推荐
- Ibatis 中使用存储过程以及sys_refcursor 返回结果
- oracle存储过程中使用Ref Cursor强类型游标返回结果集
- C++使用ADO访问Oracle返回结果集(REF CURSOR)存储过程
- oracle 存储过程返回 结果集 table形式 (使用sys_refcursor 及程序包package 两种方式)
- Oracle技术之使用REF CURSOR处理Oracle的结果集
- 使用jdbc调用oracle b294 存储过程(返回cursor)的错误及解决方法- -
- oracle中快速实现命令记录与删除键,以及使用脚本快速配置
- oracle 存储过程及REF CURSOR的使用
- Oracle动态sql返回游标(sys_refcursor)
- 使用sys_refcursor和临时表返回oracle结果集
- Oracle ref cursor使用
- 使用REF CURSOR处理Oracle的结果集
- 转:Oracle怎么处理动态SQL.ref cursor与using 参数的结合使用.来自AskTom.
- 使用REF CURSOR处理Oracle的结果集
- Oracle ref cursor使用
- 用 ref cursor 返回结果集并得到记录条数的问题
- oracle字符集乱码及返回 REF CURSOR 的存储过程执行问题
- Oracle ref cursor使用
- bulk collect 以及ref cursor使用
- Oracle数组使用以及PLSQL操作记录