Oracle9i SQL Reference Release 1 (9.0.1) Part Number A90125-01 |
|
SQL Statements:
ALTER TRIGGER to constraint_clause, 10 of 12
Use the COMMENT
statement to add a comment about a table, view, materialized view, or column into the data dictionary.
You can view the comments on a particular table or column by querying the data dictionary views USER_TAB_COMMENTS
, DBA_TAB_COMMENTS
, or ALL_TAB_COMMENTS
or USER_COL_COMMENTS
, DBA_COL_COMMENTS
, or ALL_COL_COMMENTS
.
To drop a comment from the database, set it to the empty string ' '.
The object about which you are adding a comment must be in your own schema or:
COMMENT
ANY
TABLE
system privilege to add a comment to a table, view, or materialized view.
COMMENT
ANY
INDEXTYPE
system privilege to add a comment to an indextype.
COMMENT
ANY
OPERATOR
system privilege to add a comment to an operator.
comment::=
comment
Specify the schema and name of the table, view, or materialized view to be commented. If you omit schema
, Oracle assumes the table, view, or materialized view is in your own schema.
Specify the name of the column of a table, view, or materialized view to be commented. If you omit schema
, Oracle assumes the table, view, or materialized view is in your own schema.
Specify the text of the comment.
Specify the name of the operator to be commented. If you omit schema
, Oracle assumes the operator is in your own schema.
Specify the name of the indextype to be commented. If you omit schema
, Oracle assumes the indextype is in your own schema.
COMMENT
Example
To insert an explanatory remark on the job_id
column of the employees
table, you might issue the following statement:
COMMENT ON COLUMN employees.job_id IS 'abbreviated job title';
To drop this comment from the database, issue the following statement:
COMMENT ON COLUMN employees.job_id IS ' ';
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|