OceanBase Database allows users to associate comments with schema objects (tables, operators, and index types) or non-schema objects (editions) using the COMMENT statement. 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 on a user table.
COMMENT ON TABLE test.user is "This table records user information.";Create a comment on the user_name column.
COMMENT ON COLUMN test.user.user_name is "This column records the user's name.";