declare
r_emp scott.emp%rowtype;
cursor cur_emp is
select t.* from scott.emp t; begin open cur_emp; loop
fetch cur_emp
into r_emp; exit when cur_emp%notfound; dbms_output.put_line(r_emp.empno || ' ' || r_emp.sal); end loop; close cur_emp; end;

Oracle PLSQL Demo - 09.Open、Fetch遍历游标[Open, Fetch, Close Record CURSOR]的更多相关文章

  1. 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 ...

  2. 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. ...

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

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

  4. Oracle PLSQL Demo - 16.弱类型REF游标[没有指定查询类型,已指定返回类型]

    declare Type ref_cur_variable IS REF cursor; cur_variable ref_cur_variable; rec_emp scott.emp%RowTyp ...

  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 - 15.强类型REF游标[预先指定查询类型与返回类型]

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

  7. 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 ...

  8. 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; ...

  9. Oracle PLSQL Demo - 24.分隔字符串function

    -- refer: -- http://www.cnblogs.com/gnielee/archive/2009/09/09/1563154.html -- http://www.cnblogs.co ...

随机推荐

  1. TFS2012强制解除迁出(数据库操作方式)

    同事离职,有个文件被迁出,查了好多资料终于解决. 在数据库中找到对应项目名字的数据库,例如Tfs_Project,记得先备份,保证删错了也能恢复~ 然后施行下列sql语句: --找到项目所在库 use ...

  2. innodb_file_per_table

    MySQL InnoDB引擎 默认会将所有的数据库InnoDB引擎的表数据存储在一个共享空间中:ibdata1,当增删数据库的时候,ibdata1文件不会自动收缩,单个数据库的备份也将成为问题.通常只 ...

  3. 解决 maven 项目启动 提示 class not find

    第一种方法: 项目 --> .classpath <classpathentry exported="true" kind="con" path=& ...

  4. Android 英文文档下载地址

    通过英文Android API学习Android技术是一个不错选择,当然养鸡的专业户要小心了,以下分享一些下载英文文档的链接(请使用迅雷下载): https://dl-ssl.google.com/a ...

  5. WordPress 主题教程:从零开始制作 WordPress 主题

    为什么要开发WordPress主题? WordPress主题由一系列文件和样式表单组成,这些文件和样式表单共同作用生成WordPress网站的外观.每个主题都不同,用户可以通过这些主题随心所欲地更换自 ...

  6. permission denied make_sock could not bind to address 81问题解决

    在apache中绑定非http标准端口时,一直出现如下的错误提示: [root@localhost ~]# /etc/init.d/httpd start Starting httpd: (13)Pe ...

  7. iOS 图片部分模糊,类似于美图秀秀

    代码地址如下:http://www.demodashi.com/demo/14277.html 演示效果 演示效果 代码结构 项目结构截图如下: 该模块的核心源码部分为 MBPartBlurView, ...

  8. R语言-查找满足条件的数并获取索引

    1.在R语言中,怎样找到满足条件的数呢? 比如给定一个向量c2.要求找到数值大于0的数: > c2  [1] 0.00 0.00 0.00 0.00 0.00 0.00 0.06 0.09 0. ...

  9. 安装到LG手机出错

    [2013-07-10 07:44:31 - txrjsms] ERROR: Application requires API version 11. Device API version is 8 ...

  10. TP3.2设置URL伪静态满足更好的SEO效果

    URL伪静态通常是为了满足更好的SEO效果,ThinkPHP支持伪静态URL设置,可以通过设置URL_HTML_SUFFIX参数随意在URL的最后增加你想要的静态后缀,而不会影响当前操作的正常执行. ...