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   
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章