Home>Article>Database> How to query comments in oracle

How to query comments in oracle

WBOY
WBOY Original
2022-01-26 11:27:09 10908browse

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.

How to query comments in oracle

The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.

How to query comments in oracle

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn