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; ...
随机推荐
- 如何分析Java虚拟机死锁
Thread Dump and Concurrency Locks Thread dumps are very useful for diagnosing synchronization relate ...
- const对象默觉得文件的局部变量
const 定义的对象为一个常量不能被改动. 这个想必大家都知道. 这里仅仅是介绍const对象默觉得文件的局部变量 当一个非const变量在一个c或cpp文件里为全局时,它在整个程序 ...
- PHP一些优先级的问题
直接看代码 <?php echo '1'.print(2)+3,"\n"; 不错,就是这么简单,但是很少有人能正确回答 我们执行一下 [root@localhost test ...
- protobuf配置与使用
Protobuf配置与安装 1 安装与配置 1.protobuf是google公司提出的数据存储格式,详细介绍可以参考:https://code.google.com/p/protobuf/ 2.下载 ...
- VC6.0设置注释快捷键
第一步:工具栏上右键选择Customize(定制),选择“Add-ins and Macro Files(附加项和宏文件)”页,把SAMPLE前面打上钩. 第二步:选择“Commands(命令)”页, ...
- 学会快速装系统 图解硬盘分区软件Norton Ghost使用
http://edu.itbulo.com/200909/126313_5.htm即使你拥有最先进的电脑,采用传统的方法,Windows的安装速度仍然是令人头痛的!有没有什么重装系统的简便方法呢?当然 ...
- Http Analyzer Std V3.3.1.140 汉化补丁
http://www.cnblogs.com/nicch/archive/2008/08/30/ha_httpanalyzerstdv3.html Http Analyzer Std V3.3.1.1 ...
- Python 列表 pop() 方法
描述 Python 列表 pop() 方法通过指定元素的索引值来移除列表中的某个元素(默认是最后一个元素),并且返回该元素的值,如果列表为空或者索引值超出范围会报一个异常. 语法 pop() 方法语法 ...
- Unity3D中组件事件函数的运行顺序
事件函数的运行顺序 Unity 脚本中有很多按预设顺序以脚本身份执行的事件函数. 其执行顺序例如以下: 载入第一个场景 启动场景时调用这些函数(为场景中的每一个对象调用一次). Awake: 始终在调 ...
- BZOJ 2466 中山市选2009 树 高斯消元+暴力
题目大意:树上拉灯游戏 高斯消元解异或方程组,对于全部的自由元暴力2^n枚举状态,代入计算 这做法真是一点也不优雅... #include <cstdio> #include <cs ...