Method: 1. Use "SELECT*FROM user_tab_comments WHERE TABLE_NAME=table name" to query; 2. Use "SELECT*FROM user_col_comments WHERE TABLE_NAME=table name" to query.
The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.
How to get table comments from Oracle
user_tab_comments;Table comments
user_col_comments;Table field comments
and above can only get the annotation information of the table of your own user. If you want to access the tables of other users you can access, you need to use:
all_tab_comments ;Table field comments
Of course, if you have DBA authority, you can use
all* is best to specify the owner condition. User*without this field
User_tab_comments; Table Annotation
User_Col_Comments Comment
## above two can only get the annotation information of your own table, if you want to visit yourself Tables of other users that can be accessed need to use: all_tab_comments;Table comments all_col_comments;Table field comments## dba_tab_comments;Table comments
dba_col_comments;Table field comments
dba* and all* are best to specify owner conditions. user* does not have this field
Query field comment:
SELECT * FROM all_col_comments WHERE TABLE_NAME='TABLE_NAME'
--or
SELECT * FROM user_col_comments WHERE TABLE_NAME='TABLE_NAME'
Recommended tutorial: "
Oracle Video Tutorial"
The above is the detailed content of How to query table comments in oracle. For more information, please follow other related articles on the PHP Chinese website!