Oracle统计某个用户下所有表的各自行数

发布时间:2020-08-10 22:28:32 作者:kisslfcr
来源:ITPUB博客 阅读:278
set serveroutput on 


declare
  t_count   number(10);
  t_str VARCHAR2(500);
  cursor t_tables is select table_name from user_tables;
begin
  for t_row in t_tables loop
    t_str := 'select count(*) from '|| t_row.table_name;
    execute immediate t_str into t_count;
    dbms_output.put_line( t_row.table_name || '=' || to_char(t_count));
  end loop;
end;
推荐阅读:
  1. MySQL如何统计行数大于100万的表
  2. oracle查看所有表信息

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

oracle 各自 户下

上一篇:2020年消防工程师报名条件发生变化?

下一篇:CentOS 6.7下源码编译安装MySQL 5.7.5

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》