In OceanBase Database, you can use the COMMENT statement to associate comments with schema objects (tables, operators, and index types) or non-schema objects (editions). Comments associated with schema and non-schema objects are stored in the data dictionary.
The syntax for creating comments on schema and non-schema objects is as follows:
COMMENT ON {TABLE table | COLUMN column | INDEXTYPE indextype
| OPERATOR operator} IS string
Here are some examples:
Create a comment for a user table.
COMMENT ON TABLE test.user is "This table records user information.";Create a comment for the user_name column.
COMMENT ON COLUMN test.user.user_name is "This column records the user name.";