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 ...
随机推荐
- UVa 10642 - Can You Solve It?
题目:二维平面上的整数点.用路径链接起来(0,0)->(1.0)->(0.1)->(2,0)->.. 给你两点坐标.求两点间步长(在路径上的距离). 分析:简单题. 我们发现点 ...
- chrome插件的popup与跨域请求
chrome插件的popup与跨域请求 tkorays <tkorays@hotmail.com> popup及其它js脚本 在chrome插件开发中,大致有几种类型的js ...
- code[VS] 1048 石子归并
题目描写叙述 Description 有n堆石子排成一列,每堆石子有一个重量w[i], 每次合并可以合并相邻的两堆石子.一次合并的代价为两堆石子的重量和w[i]+w[i+1]. 问安排如何的合并顺序, ...
- Oracle 11g 更改字符集
查看字符集: select * from v$nls_parameters where parameter = 'NLS_CHARACTERSET'; 修改字符集: sqlplus "/as ...
- MariaDB与MySQL并存
以下是MariaDB官方文档说明,MariaDB如何安装在已经存在MySQL实例的主机上: https://mariadb.com/kb/en/library/installing-mariadb-a ...
- plsql 常用快捷键(自动替换)
plsql 常用快捷键 CreateTime--2018年4月23日17:33:05 Author:Marydon 说明:这里的快捷键,不同于以往的快捷键,输入指定字符,按快捷键,可以自动替换成你 ...
- 新浪微博 使用OAuth2.0调用API
# -*- coding: cp936 -*- #python 2.7.10 #xiaodeng #新浪微博 使用OAuth2.0调用API #微博开放接口的调用,都需要获取用户的身份认证.目前微博开 ...
- System.out.print实现原理猜解
我们往往在main中直接调用System.out.print方法来打印,但是其实就这简单的一步里面有很多的玄机,因为main是static的,所以只能调用static的函数,那么print是stati ...
- 错误号:1364 错误信息:Field 'platId' doesn't have a default value
1. 错误描写叙述 错误号:1364 错误信息:Field 'platId' doesn't have a default value insert into `use`.`t_platform_sc ...
- Web前端开发笔试&面试_01(mi:)
—— (al_me16041719002000) begin—— 1.(单选)下面哪个方法是String对象和Array对象都有的? A.splice B.split C.replace D.conc ...