declare

    Type ref_cur_variable IS REF cursor;
cur_variable ref_cur_variable;
rec_emp scott.emp%RowType; v_sql varchar2(100) := 'select * from scott.emp t'; begin Open cur_variable For v_sql; Loop
fetch cur_variable
InTo rec_emp;
Exit When cur_variable%NotFound;
dbms_output.put_line(cur_variable%rowcount || ' -> ' || rec_emp.empno ||
' ' || rec_emp.sal);
End Loop;
Close cur_variable; end;

Oracle PLSQL Demo - 16.弱类型REF游标[没有指定查询类型,已指定返回类型]的更多相关文章

  1. Oracle PLSQL Demo - 20.弱类型REF游标[没有指定查询类型,也不指定返回类型]

    declare Type ref_cur_variable IS REF cursor; cur_variable ref_cur_variable; v_ename ); v_deptno ); v ...

  2. Oracle PLSQL Demo - 10.For Loop遍历游标[FOR LOOP CURSOR]

    declare cursor cur_emp is select t.* from scott.emp t; begin for r_emp in cur_emp loop dbms_output.p ...

  3. Oracle PLSQL Demo - 08.定义显式游标[Define CURSOR, Open, Fetch, Close CURSOR]

    declare v_empno scott.emp.empno%type; v_sal scott.emp.sal%type; cursor cur_emp is select t.empno, t. ...

  4. Oracle PLSQL Demo - 15.强类型REF游标[预先指定查询类型与返回类型]

    declare Type ref_cur_emp IS REF CURSOR RETURN scott.emp%RowType; cur_emp ref_cur_emp; rec_emp cur_em ...

  5. Oracle PLSQL Demo - 17.游标查询个别字段(非整表)

    declare Type ref_cur_variable IS REF cursor; cur_variable ref_cur_variable; v_empno scott.emp.empno% ...

  6. Oracle PLSQL Demo - 14.定义定参数的显示游标

    declare v_empno scott.emp.empno%type; v_sal scott.emp.sal%type; ) is select t.empno, t.sal from scot ...

  7. Oracle PLSQL Demo - 13.游标的各种属性[Found NotFound ISOpen RowCount CURSOR]

    declare r_emp scott.emp%rowtype; cursor cur_emp is select t.* from scott.emp t; begin open cur_emp; ...

  8. Oracle PLSQL Demo - 09.Open、Fetch遍历游标[Open, Fetch, Close Record CURSOR]

    declare r_emp scott.emp%rowtype; cursor cur_emp is select t.* from scott.emp t; begin open cur_emp; ...

  9. Oracle PLSQL Demo - 19.管道function[查询整表组成list管道返回]

    create or replace function function_demo RETURN emp PIPELINED as Type ref_cur_emp IS REF CURSOR RETU ...

随机推荐

  1. Jacoco的原理(各个覆盖率的解释)

    覆盖率计数器 Jacoco使用一系列的不同的计数器来做覆盖率的度量计算.所有这些计数器都是从java的class文件中获取信息,这些class文件可以(可选)包含调试的信息在里面.即使在没有源码的情况 ...

  2. 腾讯地图api将物理地址转化成坐标

    <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...

  3. 【协议篇】TCP

    TCP 百科名片 TCP:Transmission Control Protocol 传输控制协议TCP是一种面向连接(连接导向)的.可靠的.基于字节流的运输层(Transport layer)通信协 ...

  4. rarlinux基于linux-x64

    winrar在Win都吃香,在也linux也凄惨...  风萧萧兮易水寒,壮士一去兮不复还! 00.下载rarlinux wget http://www.rarlab.com/rar/rarlinux ...

  5. Linux下一个简单守护进程的实现 (Daemon)

    在Linux/UNIX系统引导的时候会开启很多服务,这些服务称为守护进程(也叫Daemon进程).守护进程是脱离于控制终端并且在后台周期性地执行某种任务或等待处理某些事件的进程,脱离终端是为了避免进程 ...

  6. AbatorForEclipse插件使用总结

    AbatorForEclipse是IbatorForEclipse之前的一个老版插件.插件装好后,我们来使用看看:1,新建一个工程AbatorTest,点击右键,新建一个abatorConfig.xm ...

  7. java测试Unicode编码以及数组的运用(初学篇)

    /*第二章第四小题*/ /* * (1)编写一个应用程序,给出汉字“你” ,“我”,“他”在Unicode 表中的位置 * (2)编写一个java应用程序,输出全部的希腊字母 */ public cl ...

  8. HDUOJ ---1423 Greatest Common Increasing Subsequence(LCS)

    Greatest Common Increasing Subsequence Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536 ...

  9. 【LeetCode】140. Word Break II

    Word Break II Given a string s and a dictionary of words dict, add spaces in s to construct a senten ...

  10. 程序安装制作不用愁—Wise installation入门教程

    http://blog.csdn.net/terryzero/article/details/6731925最近有个项目需要把别人的工具包装集成下,所以就随便找了个制作安装的工具,正好找到了Wise ...