Home > Database > Oracle > How to query table comments in oracle

How to query table comments in oracle

WBOY
Release: 2022-03-01 11:31:02
Original
14828 people have browsed it

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.

How to query table comments in oracle

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

How to query table comments in oracle

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'
Copy after login

--or

SELECT * FROM user_col_comments WHERE TABLE_NAME='TABLE_NAME'
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template