oracle中的sql%rowcount
来源:互联网 发布:spider python 下载 编辑:程序博客网 时间:2024/03/29 05:25
sql%rowcount用于记录修改的条数,就如你在sqlplus下执行delete from之后提示已删除xx行一样。
这个参数必须要在一个修改语句和commit之间放置,否则你就得不到正确的修改行数。
例如:
SQL> declare n number;
2 begin
3 insert into test_a select level lv from dual connect by level<500;
4 n:=sql%rowcount;
5 commit;
6 dbms_output.put_line(n);
7 end;
8 /
---------------
499
PL/SQL procedure successfully completed.
SQL> declare n number;
2 begin
3 insert into test_a select level lv from dual connect by level<500;
4 commit;
5 n:=sql%rowcount;
6 dbms_output.put_line(n);
7 end;
8 /
---------------
0
PL/SQL procedure successfully completed.
×××××××××××××
如果我连续执行了3个select语句
然后调用sql%rowcount,得到的结果是最后一个select的条数。 要统计所有的,可以使用三个变量接收sql%rowcount,然后相加即可,不过貌似直接select的写法无法使用sql%rowcount。
- ORACLE中的SQL%ROWCOUNT
- oracle中的sql%rowcount
- oracle中的sql%rowcount
- oracle中的sql%rowcount
- oracle中的sql%rowcount
- ORACLE中的SQL%ROWCOUNT
- 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
- SQL中的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
- Oracle 中的rowcount
- oracle中 sql%rowcount 用法
- oracle中的sql%found、sql%notfound、sql%rowcount和sql%isopen
- lucene4.5源码分析系列:搜索过程
- 职责链模式
- Jquery autocomplete
- 滚动加载页面
- C++单例模式
- oracle中的sql%rowcount
- 智能家居趋势
- Mean-Field Variational Inference Made Easy
- 新建工程 Sloppy Joe's Menu 无法调试
- 1163 访问艺术馆
- oracle11g 静默安装(要点记录)
- WebSphere修改默认端口
- 20130910-STM8官方STVD环境编译链设置
- 转:IE和FF在对js支持的不同及解决方法