Note
This view is available starting with V2.2.30.
Purpose
This view displays all column comments of views and tables that the current user owns.
Applicability
This view applies only to OceanBase Database in Oracle mode.
Columns
| Column | Type | Null | Description |
|---|---|---|---|
| OBJECT_NAME | VARCHAR2(128) | NO | The name of the object. |
| COLUMN_NAME | VARCHAR2(128) | NO | The name of the column. |
| COMMENTS | VARCHAR2(4000) | YES | The comment of the column. |
Sample query
Query all column comments of the T1 table that the current user owns.
obclient [SYS]> SELECT * FROM SYS.USER_COL_COMMENTS WHERE TABLE_NAME='T1';
The query result is as follows:
+------------+----------------+----------+
| TABLE_NAME | COLUMN_NAME | COMMENTS |
+------------+----------------+----------+
| T1 | __pk_increment | NULL |
| T1 | ID1 | score |
| T1 | ID2 | NULL |
+------------+----------------+----------+
3 rows in set
References
ALL_COL_COMMENTS: View all column comments of views and tables that the current user can access.
DBA_COL_COMMENTS: View all column comments of views and tables in the tenant.