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; ...
随机推荐
- ThinkPHP的A方法,R方法,M方法,D方法区别
在Thinkphp中,实例化对象有这么几种方法,如果是类,有A和R方法,区别是A方法只是对象的实例化,而R方法是可以同时实例化对象里面的方法的,这里需要去指定,如下面的实例代码: <?php n ...
- 在Tomcat下指定Jsp生成的Java文件路径
在tomcat的配置文件server.xml(路径:tomcat路径\conf下面)里,找到:<Context docBase="D:/workspace/icinfo/trunk/w ...
- nexus 介绍
http://juvenshun.iteye.com/blog/349534
- 使用CXF实现基于Rest方式的WebService(转)
转自:https://www.cnblogs.com/zjm701/p/6845813.html原文更清晰 本文介绍使用CXF实现基于Rest方式的WebService(CXF的版本是3.0.0) 一 ...
- redis通过json方案存取对象com.alibaba.fastjson.JSONException: syntax error, expect
问题描述: redis基于json方案存取对象时报错:com.alibaba.fastjson.JSONException: syntax error, expect com.alibaba.fast ...
- HDUOJ---1195Open the Lock
Open the Lock Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Tot ...
- Android开发学习之反编译APK文件
反编译的目的在于学习一些优秀的Android应用程序代码. 在进行反编译之前,需要准备好下面的软件工具(这些文件都放在同一文件下): 这些工具的下载地址:http://down.51cto.com/d ...
- Jsp通过Filter实现UrlRewriter原理
web.xml文件: <?xml version="1.0" encoding="UTF-8"?> <web-app version=&quo ...
- 手机网络抓包 转载记录http://blog.csdn.net/skylin19840101/article/details/43485911
Fiddler不但能截获各种浏览器发出的HTTP请求, 也可以截获各种智能手机发出的HTTP/HTTPS请求.Fiddler能捕获IOS设备发出的请求,比如IPhone, IPad, MacBook. ...
- Python学习笔记010——形参与实参
在使用中忽略了一个问题,形参有些和实参类似,也不能是“关键字后面含有位置参数”,即“默认形参”后面必须不能含有“位置”形参! def test(a=100,b): print("test&q ...