Stores a comment, in the system tables, about a database object.
COMMENT ON { COLUMN [ owner.]table-name.column-name | DBSPACE dbspace-name | EVENT event-name | EXTERNAL [ENVIRONMENT] OBJECT object-name | EXTERNAL ENVIRONMENT environment-name | EXTERNAL OBJECT object-name | FOREIGN KEY [owner.]table-name.role-name | INDEX [ [owner.]table.]index-name | INTEGRATED LOGIN integrated-login-id | JAVA CLASS java-class-name | JAVA JAR java-jar-name | KERBEROS LOGIN “client-Kerberos-principal” | LDAP SERVER ldap-server-name | LOGICAL SERVER logical-server-name | LOGIN POLICY policy-name | LS POLICY ls-policy-name | MATERIALIZED VIEW [owner.]materialized-view-name | PRIMARY KEY ON [owner.]table-name | PROCEDURE [owner.]table-name | ROLE role-name | SERVICE web-service-name | SEQUENCE [owner.]sequence-name | SPATIAL REFERENCE SYSTEM srs-name | SPATIAL UNIT OF MEASURE uom-identifier | TABLE [ owner.]table-name | TEXT CONFIGURATION [ owner.]text-config-name | TEXT INDEX text-index-name | TRIGGER [[owner.]table-name.]trigger-name | USER userid | VIEW [ owner.]view-name } IS comment environment-name - (back to Syntax) JAVA | PERL | PHP | C_ESQL32 | C_ESQL64 | C_ODBC32 | C_ODBC64 comment - (back to Syntax) { string | NULL }
COMMENT ON TABLE Employees IS "Employee information"
COMMENT ON TABLE Employees IS NULL
The COMMENT statement updates remarks in the ISYSREMARK system table. You can remove a comment by setting it to NULL. The owner of a comment on an index or trigger is the owner of the table on which the index or trigger is defined.
The COMMENT ON DBSPACE, COMMENT ON JAVA JAR, and COMMENT ON JAVA CLASS statements allow you to set the Remarks column in the SYS.ISYSREMARK system table. Remove a comment by setting it to NULL.
You cannot add comments for local temporary tables.
Clause | Privilege Required |
---|---|
COLUMN | Any one of:
|
DBSPACE | MANAGE ANY DBSPACE system privilege |
EVENT | Any one of:
|
EXTERNAL [ENVIRONMENT] OBJECT | MANAGE ANY EXTERNAL OBJECT system privilege |
EXTERNAL ENVIRONMENT | MANAGE ANY EXTERNAL ENVIRONMENT system privilege |
FOREIGN KEY | Any one of:
|
INDEX | Any one of:
|
INTEGRATED LOGIN | MANAGE ANY USER system privilege |
JAVA CLASS or JAVA JAR | MANAGE ANY EXTERNAL OBJECT system privilege |
KERBEROS LOGIN | MANAGE ANY USER system privilege |
LDAP SERVER | MANAGE ANY LDAP SERVER system privilege |
LOGICAL SERVER | MANAGE MULTIPLEX system privilege |
LOGIN POLICY | MANAGE ANY LOGIN POLICY system privilege |
LS POLICY | MANAGE MULTIPLEX system privilege |
MATERIALIZE VIEW | Any one of:
|
PRIMARY KEY ON | Any one of:
|
PROCEDURE | Any one of:
|
SEQUENCE | Any one of:
|
SERVICE | MANAGE ANY WEB SERVICE system privilege |
SPATIAL REFERENCE SYSTEM | Any one of:
|
SPATIAL UNIT OF MEASURE | Any one of:
|
ROLE |
System role – administrative privilege over the role being commented on. User-defined role – MANAGE ROLES system privilege or administrative privilege over the role being commented on. |
TABLE | Any one of:
|
TEXT CONFIGURATION | Any one of:
|
TEXT INDEX | Any one of:
|
TRIGGER | Any one of:
|
USER | MANAGE ANY USER system privilege |
VIEW | Any one of:
|