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

本站中文解释

Oracle 视图 ALL_COL_COMMENTS 是查询所有用户的所有表列的注释信息,包含了表列名,表或视图名以及注释文本。可用于清晰了解表列信息,描述表列含义。

使用方法:

1.查询指定用户表所有列的注释:
SELECT col_name, comments
FROM all_col_comments
WHERE owner =’所需用户名’
AND table_name = ‘所需表名’;

2.查询指定用户表指定列的注释:
SELECT col_name, comments
FROM all_col_comments
WHERE owner =’所需用户名’
AND table_name = ‘所需表名’
AND col_name = ‘所需列名’;

官方英文解释

ALL_COL_COMMENTS displays comments on the columns of the tables and views accessible to the current user.

Related Views

  • DBA_COL_COMMENTS displays comments on the columns of all tables and views in the database.

  • USER_COL_COMMENTS displays comments on the columns of 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

COLUMN_NAME

VARCHAR2(128)

NOT NULL

Name of the column

COMMENTS

VARCHAR2(4000)

Comment on the column

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_COL_COMMENTS”

  • “USER_COL_COMMENTS”


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