Contents Index CLOSE statement [ESQL] [SP] COMMIT statement

ASA SQL Reference
  SQL Statements

COMMENT statement


Description 

Use this statement to store a comment in the system tables for a database object.

Syntax 

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
   | TRIGGER [ [ owner.]tablename.]trigger-name
   | USER userid
   | VIEW [ owner.]view-name
}
IS comment

comment : string | NULL

Usage 

Several system tables have a column named Remarks that allows you to associate a comment with a database item (SYSUSERPERM, SYSTABLE, SYSCOLUMN, SYSINDEX, SYSLOGIN, SYSFOREIGNKEY, SYSPROCEDURE, SYSTRIGGER). The COMMENT ON statement allows you to set the Remarks column in these system tables. A comment can be removed by setting it to NULL.

For a comment on an index or trigger, the owner of the comment is the owner of the table on which the index or trigger is defined.

Permissions 

Must either be the owner of the database object being commented, or have DBA authority.

Side effects 

Automatic commit.

Standards and compatibility 
Example 

The following examples show how to add and remove a comment.

Add a comment to the employee table.

COMMENT
ON TABLE employee
IS 'Employee information'

Remove the comment from the employee table.

COMMENT
ON TABLE employee
IS NULL

Contents Index CLOSE statement [ESQL] [SP] COMMIT statement