oracle游标使用demo,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;

if cur_emp%isopen then

dbms_output.put_line('is open...');

end if;

loop

fetch cur_emp

into r_emp;

if cur_emp%found then

dbms_output.put_line('found...');

end if;

if cur_emp%notfound then

dbms_output.put_line('not found...');

end if;

exit when cur_emp%notfound;

dbms_output.put_line(cur_emp%rowcount || ' -> ' || r_emp.empno ||

' ' || r_emp.sal);

end loop;

close cur_emp;

end;

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 - 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 - 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 - 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 - 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 - 31.执行动态SQL拿一个返回值

DECLARE v_sql ) := ''; v_count NUMBER; BEGIN v_sql := v_sql || 'select count(1) from scott.emp t'; E ...

随机推荐

Docker和Docker-compose安装教程以及docker-elk,docker-storm安装教程

此安装教程仅供我自己安装配置时查看,其他的人不可以偷看!!! 安装Docker 1. Update package information, ensure that APT works with th ...

jquery取<input>的readOnly属性,O要大写

今天在jquery中取input的readonly属性时,发现 我这样写$(“#input”).readonly取这个属性时,总是undefined,后来一想,难道html中的属性only没有大写,是 ...

简单阐述下OC中UIImage三种创建方式~~~

一. 直接使用imageNamed进行创建 UIImage * image = [UIImage imageNamed:@"1.jpg"]; 简单说一下这种方式的优缺点: 优点:代 ...

[优先队列]HDOJ5360 Hiking

题意:有n个人,每个人有两个参数$l$和$r$ 邀请他们去hiking, 当  当前已经邀请到的人数大于等于$l$,并且小于等于$r$,那么这个人就会去 问最多能邀请到几个人 并输出 依次要邀请的人的 ...

矩阵快速幂AC代码HDU 2035

#include using namespace std;const int MOD = 1000;//像这样的一个常量就应该专门定义一下 int PowMod(in ...

关于oracle 索引,收藏

该篇文章很好,,收藏了.. https://www.cnblogs.com/liangyihui/p/5886619.html oracle 索引建立: create  bitmap/UNIQUE i ...

创建PCB原理图的模板

Q:创建PCB原理图的模板,主要就是设置模板的大小,右下角的信息框, 效果图如下: 创建PCB工程 创建原理图 设置模板,方便以后画原理图 打开模板的方式有:1按DO 2双击边框 标题块是附带有的,取 ...

Redis数据备份、安全、管理服务器笔记

Redis 数据备份与恢复 Redis SAVE 命令用于创建当前数据库的备份. 实例 redis > SAVE OK 恢复数据 如果需要恢复数据,只需将备份文件 (dump.rdb) 移动到 ...

EditText 限制输入,自定义样式,监听输入的字符,自动换行

自动获取焦点

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值