COMMENT Statement

Stores a comment, in the system tables, about a database object.

Quick Links:

Go to Examples

Go to Usage

Go to Standards

Go to Permissions

Syntax

COMMENT ONCOLUMN [ 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 }

Examples

(back to top)

Usage

(back to top)

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.

Note: Materialized views are supported only for SQL Anywhere tables in the IQ catalog store.

Standards

(back to top)

  • SQL – Vendor extension to ISO/ANSI SQL grammar.
  • SAP Sybase Database product – Not supported by Adaptive Server.

Permissions

(back to top)

Clause Privilege Required
COLUMN Any one of:
  • You own the table
  • CREATE ANY TABLE system privilege
  • ALTER ANY TABLE system privilege
  • CREATE ANY OBJECT system privilege
  • ALTER ANY OBJECT system privilege
  • COMMENT ANY OBJECT system privilege
DBSPACE MANAGE ANY DBSPACE system privilege
EVENT Any one of:
  • MANAGE ANY EVENT
  • CREATE ANY OBJECT
  • ALTER ANY OBJECT
  • COMMENT ANY OBJECT
EXTERNAL [ENVIRONMENT] OBJECT MANAGE ANY EXTERNAL OBJECT system privilege
EXTERNAL ENVIRONMENT MANAGE ANY EXTERNAL ENVIRONMENT system privilege
FOREIGN KEY Any one of:
  • You own the table
  • CREATE ANY TABLE system privilege
  • ALTER ANY TABLE system privilege
  • CREATE ANY OBJECT system privilege
  • ALTER ANY OBJECT system privilege
  • COMMENT ANY OBJECT system privilege
INDEX Any one of:
  • You own the index
  • CREATE ANY INDEX system privilege
  • ALTER ANY INDEX system privilege
  • COMMENT ANY OBJECT system privilege
  • CREATE ANY OBJECT system privilege
  • ALTER ANY OBJECT system privilege
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:
  • You own the view
  • CREATE ANY MATERIALIZED VIEW system privilege
  • ALTER ANY MATERIALIZED VIEW system privilege
  • CREATE ANY OBJECT system privilege
  • ALTER ANY OBJECT system privilege
  • COMMENT ANY OBJECT system privilege
PRIMARY KEY ON Any one of:
  • You own the table
  • CREATE ANY TABLE system privilege
  • ALTER ANY TABLE system privilege
  • CREATE ANY OBJECT system privilege
  • ALTER ANY OBJECT system privilege
  • COMMENT ANY OBJECT system privilege
PROCEDURE Any one of:
  • You own the procedure
  • CREATE ANY PROCEDURE system privilege
  • ALTER ANY PROCEDURE system privilege
  • CREATE ANY OBJECT system privilege
  • ALTER ANY OBJECT system privilege
  • COMMENT ANY OBJECT system privilege
SEQUENCE Any one of:
  • You own the sequence
  • CREATE ANY SEQUENCE system privilege
  • ALTER ANY SEQUENCE system privilege
  • CREATE ANY OBJECT system privilege
  • ALTER ANY OBJECT system privilege
  • COMMENT ANY OBJECT system privilege
SERVICE MANAGE ANY WEB SERVICE system privilege
SPATIAL REFERENCE SYSTEM Any one of:
  • COMMENT ANY OBJECT
  • CREATE ANY OBJECT
  • ALTER ANY OBJECT
  • MANAGE ANY SPATIAL OBJECT
SPATIAL UNIT OF MEASURE Any one of:
  • COMMENT ANY OBJECT
  • CREATE ANY OBJECT
  • ALTER ANY OBJECT
  • MANAGE ANY SPATIAL OBJECT
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:
  • You own the table
  • CREATE ANY TABLE system privilege
  • ALTER ANY TABLE system privilege
  • CREATE ANY OBJECT system privilege
  • ALTER ANY OBJECT system privilege
  • COMMENT ANY OBJECT system privilege
TEXT CONFIGURATION Any one of:
  • You created the text configuration
  • CREATE ANY TEXT CONFIGURATION system privilege
  • ALTER ANY TEXT CONFIGURATION system privilege
  • CREATE ANY OBJECT system privilege
  • ALTER ANY OBJECT system privilege
  • COMMENT ANY OBJECT system privilege
TEXT INDEX Any one of:
  • You created the text index
  • CREATE ANY INDEX system privilege
  • ALTER ANY INDEX system privilege
  • CREATE ANY OBJECT system privilege
  • ALTER ANY OBJECT system privilege
  • COMMENT ANY OBJECT system privilege
TRIGGER Any one of:
  • You created the trigger
  • CREATE ANY TRIGGER system privilege
  • ALTER ANY TRIGGER system privilege
  • CREATE ANY OBJECT system privilege
  • ALTER ANY OBJECT system privilege
  • COMMENT ANY OBJECT system privilege
USER MANAGE ANY USER system privilege
VIEW Any one of:
  • You own the view
  • CREATE ANY VIEW system privilege
  • ALTER ANY VIEW system privilege
  • CREATE ANY OBJECT system privilege
  • ALTER ANY OBJECT system privilege
  • COMMENT ANY OBJECT system privilege