Note
This view is available starting with V2.2.30.
Purpose
This view displays the comments on tables and views owned by the current user.
Applicability
This view applies only to OceanBase Database in Oracle mode. s
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TABLE_NAME | VARCHAR2(128) | NO | The name of the table or view |
| TABLE_TYPE | VARCHAR2(11) | NO | The object type |
| COMMENTS | VARCHAR2(4000) | NO | The object comment |
Sample query
Query the comments on the T1 table among all tables owned by the current user.
obclient [SYS]> SELECT * FROM SYS.USER_TAB_COMMENTS WHERE TABLE_NAME='T1';
The return result is as follows:
+------------+------------+------------+
| TABLE_NAME | TABLE_TYPE | COMMENTS |
+------------+------------+------------+
| T1 | TABLE | test table |
+------------+------------+------------+
1 row in set
References
ALL_TAB_COMMENTS: view comments on all tables and views accessible to the current user.
DBA_TAB_COMMENTS: view comments on all tables and views in the current tenant.
For more information about how to add comments to a table, see Add comments to schema and non-schema objects.