Oracle PLSQL Demo - 20.弱类型REF游标[没有指定查询类型,也不指定返回类型]
declare
Type ref_cur_variable IS REF cursor;
cur_variable ref_cur_variable;
v_ename varchar2(10);
v_deptno number(2);
v_sal number(7,2);
v_sql varchar2(100) := 'select t.ename, t.deptno, t.sal from scott.emp t';
begin
Open cur_variable For v_sql;
Loop
fetch cur_variable
InTo v_ename, v_deptno, v_sal;
Exit When cur_variable%NotFound;
dbms_output.put_line(cur_variable%rowcount || ' -> ' || v_ename ||
' ' || v_deptno || ' ' || v_sal);
End Loop;
Close cur_variable;
end;
Oracle PLSQL Demo - 20.弱类型REF游标[没有指定查询类型,也不指定返回类型]的更多相关文章
- 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 - 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. ...
- 转: 在hibernate中查询使用list,map定制返回类型
在使用hibernate进行查询时,使用得最多的还是通过构建hql进行查询了.在查询的过程当中,除使用经常的查询对象方法之外,还会遇到查询一个属性,或一组聚集结果的情况.在这种情况下,我们通常就需要对 ...
- 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; ...
随机推荐
- Android Studio怎样加入工程(project)为library(针对非gradle)
这篇文章还是针对非gradle build的project,gradle build有一些区别.在Eclipse要引用别的project为本project的library非常easy,可是在Andro ...
- DIV+CSS布局重新学习之float/margin/padding
之前对div的css布局一直有点半知半解,只其然却不知其所以然,到网上下载了“十天学会DIV+CSS(WEB标准)”的chm电子版,然后跟着练习了一下,特在此记录,备忘. <!DOCTYPE h ...
- eclipse cdt Program "make" not found in PATH
eclipse cdt插件,开发c/c++程序,编译时报错Program "make" not found in PATH经查C:\MinGW\bin下确实无make.exe,有m ...
- springmvc ModelAndView 和 Model
@RequestMapping("") public ModelAndView index(HttpSession session) { Object data = session ...
- zabbix对数据盘磁盘容量进行监控
示例将数据盘挂载到 /mnt目录 , 对 /mnt目录进程容量监控 item 添加对 /mnt 目录的监控项 tragger 添加触发项 这样完成对一个数据盘磁盘容量的监控
- 用setitimer实现多个定时器
从这篇文章中可以看出,setitimer只能实现一个定时器,如果多次调用setitimer,旧值都会被覆盖掉. 如何用setitimer实现多个定时器呢?下面是我的一个实现,具体的方法是: 用链表从小 ...
- mybatis映射文件(转)
以下内容为转载, 格式未调整,略丑,可直接空降至: [Mybatis框架]输出映射-resultType与resultMap 有时间或看: Mybatis 3.1中 Mapper XML 文件 的学习 ...
- oc 代码块的使用
#import <UIKit/UIKit.h> #import "AppDelegate.h" int (^max)(int,int);//定义代码块,类似c的函数指针 ...
- win7 下jenkins配置与使用
一.Jenkins的配置 1. 下载地址: Jenkins的官方网站:http://jenkins-ci.org/ 目前最新版本的Windows版:http://mirror.xmission.com ...
- OAF_OAF控件系列7 - Tree的实现(案列)
2014-06-02 Created By BaoXinjian