Defines or modifies the comment of an object.
TABLE table_name |
} IS 'text'
You can use the COMMENT command to store comments about database objects. To modify a comment of an object, you need to issue a new COMMENT command for the object. Only one comment string can be stored for each object. To delete a comment, specify an empty string (two consecutive single quotation marks with no space) for the text parameter. A comment is automatically deleted when the object is deleted.
|The name of the table to be commented. The table name can be schema-qualified.
|The name of the column to be commented in the table. The table name can be schema-qualified.
|The new comment.
Attach a comment to a table named emp:
COMMENT ON TABLE emp IS 'Current employee information';
Attach a comment to the empno column of the emp table:
COMMENT ON COLUMN emp.empno IS 'Employee identification number';
Delete the comments:
COMMENT ON TABLE emp IS '';
COMMENT ON COLUMN emp.empno IS '';
View comments for emp table:
View comments for columns in the emp table: