JavaHh

oracle查询某个用户下的全部数据表的表名和大小

select a.segment_name,a.segment_type,a.bytes,a.bytes / 1024 / 1024 byte_m,b.created

from dba_segments a

inner join all_objects b on b.object_type = \'TABLE\' and a.owner = b.owner and a.segment_name = b.object_name

where a.owner = \'USER\' and a.segment_type = \'TABLE\' /* and a.bytes>50000000*/

order by a.bytes desc;

a.owner后面跟想查询的用户名,查询没数据,可以试下a.owner = upper(\'USER\')

分类:

技术点:

相关文章:

  • 2021-12-26
  • 2022-12-23
  • 2021-06-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-17
  • 2021-10-29
  • 2022-12-23
  • 2022-12-23
  • 2022-03-02
  • 2021-12-23
相关资源
相似解决方案