ORACLE中的SQL%ROWCOUNT
来源:互联网 发布:淘宝上比较好的店铺 编辑:程序博客网 时间:2024/04/28 11:47
分类:
如果我连续执行了3个select语句然后调用SQL%ROWCOUNT,得到的结果是最后一个SELECT的条数。 要统计所有的,可以使用三个变量接收SQL%ROWCOUNT,然后相加即可。
SQL%ROWCOUNT用于记录修改的条数,就如你在sqlplus下执行delete from之后提示已删除xx行一样, 这个参数必须要在一个修改语句和commit之间放置,否则你就得不到正确的修改行数。
例如:
- SQL> declare n number;
- begin
- insert into test_a select level lv from dual connect by level<500;
- n:=sql%rowcount;
- commit;
- dbms_output.put_line(n);
- end;
- /
- PL/SQL procedure successfully completed.
- SQL> declare n number;
- begin
- insert into test_a select level lv from dual connect by level<500;
- commit;
- n:=sql%rowcount;
- dbms_output.put_line(n);
- end;
- /
- PL/SQL procedure successfully completed.
- ******************
如果我连续执行了3个select语句然后调用SQL%ROWCOUNT,得到的结果是最后一个SELECT的条数。 要统计所有的,可以使用三个变量接收SQL%ROWCOUNT,然后相加即可。
0 0
- 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
- Oracle sqlldr
- 要点MARK
- CFS Bandwidth Control
- 栈应用:中缀表达式转后缀表达式并以二叉树储存
- 文章标题
- ORACLE中的SQL%ROWCOUNT
- 程序员PDF书籍下载
- Mysql实现split函数——支持多字符分割
- Monkey测试log分析三
- 每天积累以点点
- Android apk反编译
- 浅析C#中的Attribute
- C#调用Web Service时的身份验证
- TOMCAT 7优化前及优化后的性能对比