Oracle查看表結(jié)構(gòu)命令詳解
獲取表:
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='用戶名' 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,這兩個比user_tab_comments多了ower列。
獲取字段注釋:
select * from user_col_comments user_col_comments:table_name,column_name,comments
總結(jié)
以上所述是小編給大家介紹的Oracle查看表結(jié)構(gòu)命令,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復(fù)大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!
相關(guān)文章
oracle表空間表分區(qū)詳解及oracle表分區(qū)查詢使用方法
racle表空間表分區(qū)詳解及oracle表分區(qū)查詢使用方法,大家參考使用吧2013-12-12兩種oracle創(chuàng)建字段自增長的實現(xiàn)方式
這篇文章介紹了兩種oracle創(chuàng)建字段自增長的實現(xiàn)方式,一是序列+觸發(fā)器,二是序列+顯示調(diào)用序列,需要的朋友可以參考下2015-07-07Oracle實現(xiàn)某表隨機抽取數(shù)據(jù)(隨機性抽取)
這篇文章主要介紹了Oracle實現(xiàn)某表隨機抽取數(shù)據(jù)(隨機性抽取),具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教2024-08-08Oracle數(shù)據(jù)庫游標(biāo)連接超出解決方案
這篇文章主要介紹了Oracle數(shù)據(jù)庫游標(biāo)連接超出解決方案,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友可以參考下2020-07-07Oracle多行數(shù)據(jù)合并為一行數(shù)據(jù)并將列數(shù)據(jù)轉(zhuǎn)為字段名三種方式
怎么合并多行記錄的字符串,一直是oracle新手喜歡問的SQL問題之一,下面這篇文章主要給大家介紹了關(guān)于Oracle多行數(shù)據(jù)合并為一行數(shù)據(jù)并將列數(shù)據(jù)轉(zhuǎn)為字段名的三種方式,文中通過代碼介紹的非常詳細(xì),需要的朋友可以參考下2024-06-06navicat導(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-05Oracle Session每日統(tǒng)計功能實現(xiàn)
客戶最近有這樣的需求,想通過統(tǒng)計Oracle數(shù)據(jù)庫活躍會話數(shù),并記錄在案,利用比對歷史的活躍會話的方式,實現(xiàn)對系統(tǒng)整體用戶并發(fā)量有大概的預(yù)估,本文給大家分享具體實現(xiàn)方法,感興趣的朋友一起看看吧2022-02-02