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;

 

你可能感兴趣的:(Oracle)