How to query comments in oracle: 1. Use the "select * from user_tab_comments" statement to query table comments; 2. Use the "select * from user_col_comments" statement to query field comments.
The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.
Get table comments
user_tab_comments;表注释 select * from user_tab_comments
user_tab_comments: table_name, table_type, comments.
Correspondingly, there are dba_tab_comments and all_tab_comments, which have more owe columns than user_tab_comments.
Get field comments
select * from user_col_comments user_col_comments:table_name,column_name,comments
The corresponding ones are dba_col_comments, all_col_comments, these two have more owe columns than user_col_comments.
user_col_comments;Table field comments (column comments)
The user_col_comments view displays comments that have been entered for columns in the table. These comments are added to the database via the comment command. The user_col_comments view contains 3 columns:
Table_Name Table name or view name
Column_Name Column name
Comments Comments that have been entered for the column
Recommended tutorial: "Oracle Video Tutorial"
The above is the detailed content of How to query comments in oracle. For more information, please follow other related articles on the PHP Chinese website!