Oracle 查詢表信息獲取表字段及字段注釋
更新時(shí)間:2014年08月05日 10:20:03 投稿:whsnow
本節(jié)主要介紹了Oracle 查詢表信息獲取表字段及字段注釋,需要的朋友可以參考下
獲取表字段:
select * from user_tab_columns where Table_Name='用戶表' order by column_name
獲取表注釋:
select * from user_tab_comments where Table_Name='用戶表' order by Table_Name
獲取字段注釋:
select * from user_col_comments where Table_Name='用戶表' order by column_name /* 獲取表:*/ select table_name from user_tables; //當(dāng)前用戶的表 select table_name from all_tables; //所有用戶的表 select table_name from dba_tables; //包括系統(tǒng)表 select table_name from dba_tables where owner='zfxfzb' /* user_tables: table_name,tablespace_name,last_analyzed等 dba_tables: ower,table_name,tablespace_name,last_analyzed等 all_tables: ower,table_name,tablespace_name,last_analyzed等 all_objects: ower,object_name,subobject_name,object_id,created,last_ddl_time,timestamp,status等 */ /* 獲取表字段:*/ select * from user_tab_columns where Table_Name='用戶表'; select * from all_tab_columns where Table_Name='用戶表'; select * from dba_tab_columns where Table_Name='用戶表'; /* user_tab_columns: table_name,column_name,data_type,data_length,data_precision,data_scale,nullable,column_id等 all_tab_columns : ower,table_name,column_name,data_type,data_length,data_precision,data_scale,nullable,column_id等 dba_tab_columns: ower,table_name,column_name,data_type,data_length,data_precision,data_scale,nullable,column_id等 */ /* 獲取表注釋:*/ select * from user_tab_comments /* user_tab_comments:table_name,table_type,comments 相應(yīng)的還有dba_tab_comments,all_tab_comments,這兩個(gè)比user_tab_comments多了ower列。 */ /* 獲取字段注釋:*/ select * from user_col_comments /* user_col_comments:table_name,column_name,comments 相應(yīng)的還有dba_col_comments,all_col_comments,這兩個(gè)比user_col_comments多了ower列。 */
您可能感興趣的文章:
相關(guān)文章
Oracle ASM數(shù)據(jù)庫故障數(shù)據(jù)恢復(fù)解決方案
這篇文章主要介紹了Oracle ASM數(shù)據(jù)庫故障數(shù)據(jù)恢復(fù)解決方案,需要的朋友可以參考下2017-04-04怎么才能限制SQL Server只能讓指定的機(jī)器連接
怎么才能限制SQL Server只能讓指定的機(jī)器連接...2007-03-03詳解Oracle如何將txt文件中的數(shù)據(jù)導(dǎo)入數(shù)據(jù)庫
這篇文章主要介紹了Oracle如何將txt文件中的數(shù)據(jù)導(dǎo)入數(shù)據(jù)庫,文中通過代碼示例和圖文結(jié)合的方式給大家講解的非常詳細(xì),對大家的學(xué)習(xí)或工作有一定的幫助,需要的朋友可以參考下2024-03-03Oracle數(shù)據(jù)庫中刪除表空間的詳細(xì)步驟與示例代碼
在 Oracle 數(shù)據(jù)庫中,表空間是存儲(chǔ)數(shù)據(jù)的邏輯容器,有時(shí)候,我們可能需要?jiǎng)h除不再使用的表空間以釋放空間或進(jìn)行數(shù)據(jù)庫重組,本文將詳細(xì)介紹在 Oracle 數(shù)據(jù)庫中刪除表空間的步驟和示例代碼,需要的朋友可以參考下2024-01-01Oracle索引(B*tree與Bitmap)的學(xué)習(xí)總結(jié)
本篇文章是對Oracle索引(B*tree與Bitmap)進(jìn)行了詳細(xì)的分析介紹,需要的朋友參考下2013-05-05navicat導(dǎo)入oracle導(dǎo)出的dmp文件
現(xiàn)在工作中常用Oracle數(shù)據(jù)庫,但是查詢工具還是Navicat最好用,不論是數(shù)據(jù)導(dǎo)入導(dǎo)出,還是執(zhí)行語句,都很清晰明了,下面這篇文章主要給大家介紹了關(guān)于navicat導(dǎo)入oracle導(dǎo)出的dmp文件的相關(guān)資料,需要的朋友可以參考下2023-05-05解決The?Network?Adapter?could?not?establish?the?conn問題
這篇文章主要介紹了解決The?Network?Adapter?could?not?establish?the?conn問題,具有很好的參考價(jià)值,希望對大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2023-02-02