oracle查看表和列的描述


查看備注:

     --查看表的comment 
     select   *   from   all_tab_comments   where   table_name= upper(tablename) ;

     --查看列的comment 
     select   *   from   all_col_comments   where   table_name=upper(tablename) ;

 
 

下面為您介紹的語句用於實現oracle查詢用戶所有表,如果您對oracle查詢方面感興趣的話,不妨一看。

select * from all_tab_comments 
-- 查詢所有用戶的表,視圖等

select * from user_tab_comments   
-- 查詢本用戶的表,視圖等

select * from all_col_comments 
--查詢所有用戶的表的列名和注釋.

select * from user_col_comments 
-- 查詢本用戶的表的列名和注釋

select * from all_tab_columns 
--查詢所有用戶的表的列名等信息(詳細但是沒有備注).

select * from user_tab_columns 
--查詢本用戶的表的列名等信息(詳細但是沒有備注).

--一般使用1:
select t.table_name,t.comments from user_tab_comments t

--一般使用2:
select r1, r2, r3, r5
from (select a.table_name r1, a.column_name r2, a.comments r3
          from user_col_comments a),
       (select t.table_name r4, t.comments r5 from user_tab_comments t)
where r4 = r1

以上就是oracle查詢用戶所有表的語句介紹。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM