oracle dba user all三种类型的系统对象

 

select   table_name   from   dba_tables   where   owner   =   '用户名 ';

select   table_name   from   user_tables;来查看所有属于当前用户的表

select   table_name   from   all_tables;来查看所有当前用户可以访问的表

SQL> select count(*) from user_tables;

  COUNT(*)                                                                     

----------                                                                     

       868                                                                      

SQL> select count(*) from all_tables;

  COUNT(*)                                                                     

----------                                                                     

      2469                                                                      

SQL> select count(*) from dba_tables;

  COUNT(*)                                                                     

----------                                                                      

      2469                                                                     

SQL> select count(*) from dba_views;

  COUNT(*)                                                                     

----------                                                                      

      4747                                                                     

SQL> select count(*) from all_views;

  COUNT(*)                                                                     

----------                                                                     

      4747                                                                     

SQL> select count(*) from user_views;

  COUNT(*)                                                                      

----------                                                                     

      3445                                                                     

SQL> select count(*) from dba_roles;

  COUNT(*)                                                                     

----------                                                                      

        52                                                                     

SQL> select count(*) from all_users;

  COUNT(*)                                                                     

----------                                                                     

        33                                                                     

SQL> select count(*) from dba_users;

  COUNT(*)                                                                     

----------                                                                     

        33                                                                      

SQL> select count(*) from user_users;

  COUNT(*)                                                                     

----------                                                                     

         1                                                                      

SQL> select count(*) from all_tab_privs;

  COUNT(*)                                                                      

----------                                                                     

     30295                                                                     

SQL> select count(*) from dba_tab_privs;

  COUNT(*)                                                                     

----------                                                                     

     31438                                                                     

SQL> select count(*) from user_tab_privs;

  COUNT(*)                                                                     

----------                                                                     

     26214                                                                     

SQL> select count(*) from user_role_privs;

  COUNT(*)                                                                     

----------                                                                      

        50                                                                     

SQL> select count(*) from user_role_privs;

  COUNT(*)                                                                     

----------                                                                     

        50   

你可能感兴趣的:(oracle,sql,user,table)