Oracle PLSQL Demo - 16.弱类型REF游标[没有指定查询类型,已指定返回类型]
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游标[没有指定查询类型,已指定返回类型]的更多相关文章
- 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 - 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 - 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 - 17.游标查询个别字段(非整表)
declare Type ref_cur_variable IS REF cursor; cur_variable ref_cur_variable; v_empno scott.emp.empno% ...
- 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 - 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; ...
- Oracle PLSQL Demo - 19.管道function[查询整表组成list管道返回]
create or replace function function_demo RETURN emp PIPELINED as Type ref_cur_emp IS REF CURSOR RETU ...
随机推荐
- hdu4059The Boss on Mars 容斥原理
//求1到n之间与n互质的数的四次方的和 //segma(n^4) = (6n^5+15n^4+10n^3-n)/30 //对于(a/b)%mod能够转化为(a*inv(b))%mod //inv(b ...
- lnmp环境的使用教程
lnmp环境的使用 安装的软件都安装到了:/usr/local 管理nginx service nginx start|stop|restart|reload 管理mysql 直接执行mysql即可登 ...
- java数组转json
public String toJsonObject(String[] list) { String json="["; for (int i=0;i<list.length ...
- Redis学习(1)--环境配置,安装JDK,MySQL,tomcat
Linux上安装jdk,mysql,tomcat安装 rpm命令: 相当于Windows的安装/卸载程序.可以进行程序的安装,更新,卸载,查看. 本地程序安装:rpm -ivh 程序名 本地程序查看: ...
- MySQL中分组取第一条, 以及删除多余的重复记录
检查重复记录 -- 检查重复code1 select count(identity) num, identity from event_log where code='code1' order by ...
- 微信小程序独家秘笈之左滑删除
代码地址如下:http://www.demodashi.com/demo/14056.html 一.前期准备工作 软件环境:微信开发者工具 官方下载地址:https://mp.weixin.qq.co ...
- 利用 AFN 上传相册或拍照图片
概述 自定义上传图片请求,自定义调取相册及拍照,方便多处使用时调用. 详细 代码下载:http://www.demodashi.com/demo/10718.html 由于项目中多处需要上传图片,我们 ...
- PHP-Ajax跨域解决方案
1.先了解下Ajax跨域问题: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "ht ...
- Integer 内部实现
public static void main(String[] args) { Integer in1 = 128; Integer in2 = 128; System.out.println(in ...
- ArchLinux下LXDE的安装与设置心得
安装 首先安装基本的桌面环境: $ sudo pacman -S lxde 奇怪的是默认并没有安装面板lxpanel,而且源里也没有,只好从AUR安装之: $ yaourt -S lxpanel-sv ...