Oracle 视图 ALL_TAB_COMMENTS 官方解释,作用,如何使用详细说明

本站中文解释

All_Tab_Comments视图可以获取表、索引和视图的注释信息,仅对拥有COMMENT ON表、索引或视图权限的用户可用。

All_Tab_Comments的结构如下:

OWNER 对象的拥有者
TABLE_NAME 对象的名称
COMMENTS 对象的注释信息

使用方法:

SELECT owner, table_name, comments
FROM all_tab_comments
WHERE table_name = ‘Table_Name’;

这句 SQL 语句将返回指定表的拥有者、名称和注释,例如:OWNER,TABLE_NAME和COMMENTS。

官方英文解释

ALL_TAB_COMMENTS displays comments on the tables and views accessible to the current user.

Related Views

  • DBA_TAB_COMMENTS displays comments on all tables and views in the database.

  • USER_TAB_COMMENTS displays comments on the tables and views owned by the current user. This view does not display the OWNER column.

Column Datatype NULL Description

OWNER

VARCHAR2(128)

NOT NULL

Owner of the object

TABLE_NAME

VARCHAR2(128)

NOT NULL

Name of the object

TABLE_TYPE

VARCHAR2(11)

Type of the object

COMMENTS

VARCHAR2(4000)

Comment on the object

ORIGIN_CON_ID

NUMBER

The ID of the container where the data originates. Possible values include:

  • 0: This value is used for rows in non-CDBs. This value is not used for CDBs

  • n: This value is used for rows containing data that originate in the container with the ID n (n=1 if the data originates in root)

See Also:

  • “DBA_TAB_COMMENTS”

  • “USER_TAB_COMMENTS”


数据运维技术 » Oracle 视图 ALL_TAB_COMMENTS 官方解释,作用,如何使用详细说明