COMMENT ON Statement (comment_on_statement) Locate the document in its SAP Library structure

The COMMENT ON statement ( comment_on_statement) creates, alters, or drops a comment for a database object stored in the database catalog.

Syntax

<comment_on_statement> ::= COMMENT ON <object_spec> IS <comment>

<object_spec> ::= see explanation
<comment> ::= <string_literal> | <parameter_name>

string_literal, parameter_name

Explanation

Comments can be specified for the following database objects:

<object_spec> ::=

Explanation

COLUMN <table_name>.<column_name>

table_name, column_name

The column must exist in the specified table. The current user must be the owner of the table.
The comment for this column can be interrogated by selecting the system table DOMAIN. Structure linkCOLUMNS.

DBPROC[EDURE] <dbproc_name>

dbproc_name

dbproc_name must identify an existing database procedure whose owner is the current user. A comment is stored for the DB procedure. The comment can be interrogated by selecting the system table DOMAIN. Structure linkDBPROCEDURES.

DOMAIN <domain_name>

domain_name

domain_name must specify a domain of the current user. The comment for this domain can be interrogated by selecting the system table DOMAIN. Structure linkDOMAINS.

FOREIGN KEY <table_name>.<referential_constraint_name>

referential constraint name

referential_constraint_name must specify a referential CONSTRAINT definition for the specified table of the current owner.
The comment for this referential CONSTRAINT definition can be interrogated by selecting the system table DOMAIN. Structure linkFOREIGNKEYS.

INDEX <index_name> ON <table_name>

index_name

index_name must specify an index of the specified table. The current user must be the owner of the table.
The comment for this index can be interrogated by selecting the system table DOMAIN. Structure linkINDEXES.

SEQUENCE <sequence_name>

sequence_name

An existing sequence must be specified using sequence_name. The current user must be the owner of the sequence.
The comment for this sequence can be interrogated by selecting the system table DOMAIN. Structure linkSEQUENCES.

[PUBLIC] SYNONYM <synonym_name>

synonym_name

synonym_name must specify a synonym of the current user.
If PUBLIC is specified, the synonym must have the PUBLIC attribute.
The comment for this synonym can be interrogated by selecting the system table DOMAIN. Structure linkSYNONYMS.

TABLE <table_name>

table_name

The specified table must identify a base or view table of the current user that is not a temporary table.
The comment for this table can be interrogated by selecting the system table DOMAIN.Structure linkTABLES.

TRIGGER <trigger_name>.<table_name>

trigger_name

The specified trigger name must identify a trigger of the specified table. The current user must be the owner of the table. A comment is stored for the trigger. The comment can be interrogated by selecting the system table DOMAIN. Structure linkTRIGGERS.

USER <user_name>

user_name

The specified user must identify an existing user whose owner is the current user.
The comment for this user can be interrogated by selecting the system table DOMAIN.Structure linkUSERS.

USERGROUP <usergroup_name>

usergroup_name

The specified user group must identify an existing user group whose owner is the current user.
The comment for this user group can be interrogated by selecting the system table DOMAIN.
Structure linkUSERS.

<parameter_name>

parameter_name

The corresponding variable must contain one of the values listed in the table. The values must be encapsulated in quotation marks.

Example of specifying the corresponding variables:

'COLUMN <table_name>.<column_name>'