Stores a comment in the system tables for a database object.
COMMENT ON { COLUMN [ owner.]table-name.column-name | EVENT event-name | FOREIGN KEY [ owner.]table-name.role-name | INDEX [ [ owner.]table.]index-name | JAVA CLASS java-class-name |JAVA JAR java-jar-name | LOGIN integrated_login_id | PROCEDURE [ owner.]procedure-name | SERVICE web-service-name | TABLE [ owner.]table-name | USER userid | VIEW [ owner.]view-name } IS comment
{ string | NULL }
These examples show how to add and remove a comment.
Adds a comment to the employee table:
COMMENT ON TABLE employee IS "Employee information"
Removes the comment from the employee table:
COMMENT ON TABLE employee IS NULL
Several system tables have a column named Remarks that lets you associate a comment with a database item:
SYSCOLUMN |
SYSLOGIN |
SYSEVENT |
SYSPROCEDURE |
SYSFOREIGNKEY |
SYSPROCPARM |
SYSINDEX |
SYSPUBLICATION |
SYSIQJOININDEX |
SYSREMOTETYPE |
SYSJAR |
SYSTABLE |
SYSJARCOMPONENT |
SYSUSERPERM |
SYSJAVACLASS |
COMMENT ON lets you set the Remarks column in these system tables. You can remove a comment by setting it to NULL.
Automatic commit.
Must either be the owner of the database object being commented, or have DBA authority.