温馨提示×

温馨提示×

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

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

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

发布时间:2020-08-10 22:28:32 来源:ITPUB博客 阅读:280 作者:kisslfcr 栏目:关系型数据库
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;
向AI问一下细节

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

AI