Valid in: SQL, ESQL
The Comment On statement creates a comment on a table, view, or column.
The Comment On statement has the following format:
[EXEC SQL] COMMENT ON
TABLE [schema.]table_name | COLUMN [schema.]table_name.column_name
IS remark_text
Specifies the table for which the constraint is defined.
Defines the text of the comment.
Limits: The maximum length for a comment is 1600 characters.
The Comment On statement stores comments about a table, view, or column.
To display the comments, use the help comment statement.
To delete the comments, issue the comment on statement and specify an empty string (' '). Comments on tables and views are deleted when the table or view is dropped.
You cannot use host language variables in an embedded Comment On statement.
You can only create comments on tables or views that you own.
The Comment On statement locks the iidbms_comment system catalog and takes an exclusive lock on the table on which the comment is being created.
The following examples store comments about a table:
comment on table authors is
'It was the best of times, it was the worst
of times. It was...'
comment on table authors is '';
comment on column authors.name is 'Call me Ishmael';