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

Oracle PLSQL Demo - 13.游标的各种属性[Found NotFound ISOpen RowCount CURSOR]的更多相关文章

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

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

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

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

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

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

  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 - 14.定义定参数的显示游标

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

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

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

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

  9. Oracle PLSQL Demo - 31.执行动态SQL拿一个返回值

    DECLARE v_sql ) := ''; v_count NUMBER; BEGIN v_sql := v_sql || 'select count(1) from scott.emp t'; E ...

随机推荐

  1. Memcachedclient-XMemcached使用

    一. XMemcached 简单介绍 XMemcached 是一个新 java memcached client . 或许你还不知道 memcached 是什么?能够先看看这里.简单来说, Memca ...

  2. oracel become INDEX UNUSABLE

    1. IMPORT PARTITION or conventional path SQL*Loader. 2. Direct-path SQL*Loader leaves affected local ...

  3. eclipse Java代码折叠工具

      eclipse Java代码折叠工具 CreateTime--2018年5月17日15点09分 Author:Marydon 1.问题描述 eclipse自带的代码折叠工具,无法折叠try{}ca ...

  4. 【BIEE】超过了已配置的最大允许输入记录数

    声明:BIEE版本为Oracle Business Intelligence 11.1.1.7.160719 BIEE打开报表报错如下: 如果你是英文版的错误如下: "View Displa ...

  5. Java 爬虫(获取指定页面中所有的邮箱地址)

    import java.io.BufferedReader;import java.io.FileReader;import java.io.IOException;import java.io.In ...

  6. mybatis映射文件(转)

    以下内容为转载, 格式未调整,略丑,可直接空降至: [Mybatis框架]输出映射-resultType与resultMap 有时间或看: Mybatis 3.1中 Mapper XML 文件 的学习 ...

  7. [转]网易云音乐Android版使用的开源组件

    原文链接 网易云音乐Android版从第一版使用到现在,全新的 Material Design 界面,更加清新.简洁.同样也是音乐播放器开发者,我们确实需要思考,相同的功能,会如何选择.感谢开源,让我 ...

  8. vi/vim 查找替换使用方法

    http://wzgyantai.blogbus.com/logs/28117977.html vi/vim 中可以使用 :s 命令来替换字符串.该命令有很多种不同细节使用方法,可以实现复杂的功能,记 ...

  9. sql server分配某个用户只对某一个数据库有权限 转载 http://blog.sina.com.cn/s/blog_13554ebc70102wi3h.html

    sql server 2008新建用户只能访问指定数据库   新装的sql Server 2008,想让指定的用户可以访问sql Server客户端,sa的权限太大,所以最好禁用掉,   然后我们需要 ...

  10. DBA_实践指南系列6_Oracle Erp R12工作流通知邮件配置Email(案例)

    2013-12-06 Created By BaoXinjian