Oracle中如何查询一个用户下有多少张表、视图等等?

解决方案 »

  1.   

    select   count(*)   from   dba_objects
      

  2.   

    哦 写错了在用户下的话是select   count(*)   from   user_tables
      

  3.   

     select * from user_all_tables 
      

  4.   

    select   COUNT(1)   from   dba_objects where owner = '用户名'
    AND OBJECT_TYPE='VIEW'
    select   COUNT(1)   from   dba_objects where owner = '用户名'
    AND OBJECT_TYPE='TABLE'
      

  5.   

    明细:select * from dba_objects where owner = 'XXX' and object_type in ('TABLE','VIEW')总数:select COUNT(0) from dba_objects where owner = 'XXX' and object_type in ('TABLE','VIEW') GROUP BY object_type
      

  6.   

    select * from dba_objects where owner = 'XXX' and object_type in ('TABLE','VIEW') 
      

  7.   

    select * from tab;