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; 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]的更多相关文章
- 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 ...
- 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. ...
- Oracle PLSQL Demo - 20.弱类型REF游标[没有指定查询类型,也不指定返回类型]
declare Type ref_cur_variable IS REF cursor; cur_variable ref_cur_variable; v_ename ); v_deptno ); v ...
- Oracle PLSQL Demo - 16.弱类型REF游标[没有指定查询类型,已指定返回类型]
declare Type ref_cur_variable IS REF cursor; cur_variable ref_cur_variable; rec_emp scott.emp%RowTyp ...
- Oracle PLSQL Demo - 17.游标查询个别字段(非整表)
declare Type ref_cur_variable IS REF cursor; cur_variable ref_cur_variable; v_empno scott.emp.empno% ...
- 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 ...
- 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 ...
- 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; ...
- Oracle PLSQL Demo - 24.分隔字符串function
-- refer: -- http://www.cnblogs.com/gnielee/archive/2009/09/09/1563154.html -- http://www.cnblogs.co ...
随机推荐
- C++AMP介绍(一)
C++AMP介绍(一) 最后更新日期:2014-05-02 阅读前提: 环境:Windows 8.1 64bit英文版,Visual Studio 2013 Professional Update1英 ...
- MariaDB初始化和启动故障
初始化故障排查 1. so依赖缺失 比如报这样的错误: ./bin/mysqld: error while loading shared libraries: libnuma.so.1: cannot ...
- heap与stack的差
本文内容来源于<程序猿面试宝典>第三版. 在进行C/C++编程时.常常将操作的内存分下面几个类别: 栈区(stack):由编译器自己主动分配和释放,存放函数的參数值.局部变量的值等. 其操 ...
- [Done]ftp使用小结
基本命令: put 本地文件名 ftp文件名 get ftp文件名 本地文件名 mget ftp文件多个文件 注意使用该命令时先用 lcd切换本地路径 还有一些常用的 ls mkdir 等,参考 ...
- 类的专有方法(__getattr__和__setattr__、__delattr__)
# -*- coding: utf-8 -*- #python 27 #xiaodeng #http://www.360doc.com/content/15/0413/19/12067640_4629 ...
- JPA实体继承实体的映射策略
注:这里所说的实体指的是@Entity注解的类 继承映射使用@Inheritance来注解.它的strategy属性的取值由枚举InheritanceType来定义(包含SINGLE_TABLE.TA ...
- 用JSON-server模拟REST API
来源于: 用JSON-server模拟REST API(一) 安装运行 用JSON-server模拟REST API(二) 动态数据 用JSON-server模拟REST API(三) 进阶使用 在开 ...
- HDUOJ--2079选课时间(题目已修改,注意读题)
选课时间(题目已修改,注意读题) Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) ...
- SecureCRT 设置中文编码
http://www.diybl.com/course/6_system/linux/Linuxjs/20090326/163546.html 装了个secureCRT,可老是出现乱码 于是 ...
- python学习笔记——多进程二 进程的退出
1 进程的退出函数的基础语法 1.1 进程的退出函数 进程的退出含有有os._exit([status])和sys.exit([status])两种,从数据包来看,该退出模块仅在linux或者unix ...