oracle中的sql%rowcount,sql%found、sql%notfound、sql%rowcount和sql%isopen
来源:互联网 发布:以前开过淘宝店怎样重新开通 编辑:程序博客网 时间:2024/04/28 15:58
sql是系统自动创建隐式游标;
隐式游标自动声明、打开和关闭,其名为 SQL;
通过检查隐式游标的属性可以获得最近执行的DML 语句的信息;
隐式游标的属性有:
SQL%FOUND – SQL 语句影响了一行或多行时为 TRUE;
SQL%NOTFOUND – SQL 语句没有影响任何行时为TRUE;
SQL%ROWCOUNT – SQL 语句影响的行数;
SQL%ISOPEN - 游标是否打开,始终为FALSE;
简单举例:
1、
begin update salary set bonus = 1000 where emp_id = 10; if sql%notfound then insert salary(bonus)values(100); end if; .................
2、
create or replace procedure delDept(p_deptno in dept.deptno%type) isEmpCount NUMBER; --影响的记录数begin delete from dept where deptno=p_deptno; EmpCount := SQL%ROWCOUNT; if(EmpCount <>0) then dbms_output.put_line('部门删除成功...'); exception when others then dbms_output.put_line('部门删除失败...');end;
阅读全文
0 0
- oracle中的sql%rowcount,sql%found、sql%notfound、sql%rowcount和sql%isopen
- oracle中的sql%rowcount,sql%found、sql%notfound、sql%rowcount和sql%isopen
- oracle中的sql%rowcount,sql%found、sql%notfound、sql%rowcount和sql%isopen
- oracle中的sql%rowcount,sql%found、sql%notfound、sql%rowcount和sql%isopen
- oracle中的sql%found、sql%notfound、sql%rowcount和sql%isopen
- 游标属性SQL%FOUND, SQL%NOTFOUND, SQL%ROWCOUNT, SQL%ISOPEN
- sql%found sql%notfound sql%rowcount sql%isopen
- sql%found sql%notfound sql%rowcount sql%isopen
- oracle中的sql%found sql%notfound和sql%rowcount
- oracle中的sql%found sql%notfound和sql%rowcount
- [转载]oracle中的sql%found sql%notfound和sql%rowcount
- oracle中的sql%found sql%notfound和sql%rowcount
- oracle sql%found sql%notfound和sql%rowcount
- SQL%FOUND,SQL%NOTFOUND,SQL%ROWCOUNT
- sql%rowcount,sql%found,sql%notfound
- sql%found/sql%notfound/sql%rowcount
- oracle数据库 sql%found,sql%notfound,sql%rowcount
- oracle数据库 sql%found,sql%notfound,sql%rowcount
- C语言程序设计17通信 第三章作业
- A Plug for UNIX UVA
- CAN总线学习总结——错误帧和错误状态
- elasticsearch5.3.0 bulk index 性能调优实践
- centos7 zabbix3.0安装
- oracle中的sql%rowcount,sql%found、sql%notfound、sql%rowcount和sql%isopen
- [vijos1292]火车票
- 经典冒泡排序 从小到大排序 JavaScript实现
- 花生壳使用总结
- ES6 async/await在项目中的应用
- 网络通信关键函数理解
- C语言的字符串转化为整型:atoi
- 关于Java的输入与输出
- Python学习笔记-列表生成式结构深入分析