| COMMENT |
COMMENT ON {TABLE [schema.]{table | view | snapshot} |
COLUMN [schema.]{table | view | snapshot}.column
}
IS 'text' |
Adds a comment about a table, view, snapshot, or column into the data dictionary.
Keywords
schema
Specifies the name of a schema containing the table, view, or snapshot that will have a comment associated with it. If schema is omitted, the current schema is assumed.
TABLE
Specifies that the comment be associated with a table, view, or snapshot.
table
Specifies the name of a table with which the comment will be associated.
view
Specifies the name of a view with which the comment will be associated.
snapshot
Specifies the name of a snapshot with which the comment will be associated.
COLUMN
Specifies that the comment be associated with a column.
column
Specifies the name of the column to be commented.
text
The actual text of the comment. This text will be recorded in the data dictionary.
|
Example
Add a comment to the ename column of scott's emp table:
COMMENT ON COLUMN scott.emp.ename IS 'Last name from personnel records';
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access
