Oracle7 Server SQL Reference

Contents Index Home Previous Next

COMMENT

Purpose

To add a comment about a table, view, snapshot, or column into the data dictionary.

Prerequisites

The table, view, or snapshot must be in your own schema or you must have COMMENT ANY TABLE system privilege.

If you are using Trusted Oracle7 in DBMS MAC mode, your DBMS label must match the creation label of the table, view, snapshot, or column.

Syntax

Keywords and Parameters

TABLE

specifies the schema and name of the table, view, or snapshot to be commented.

COLUMN

specifies the name of the column of a table, view, or snapshot to be commented.

If you omit schema, Oracle7 assumes the table, view, or snapshot is in your own schema.

IS 'text'

is the text of the comment. See the syntax description of 'text' [*].

Usage Notes

You can effectively drop a comment from the database by setting it to the empty string ''. For information on the data dictionary views that contain comments, see Appendix B "Data Dictionary Reference" of Oracle7 Server Reference.

Example

To insert an explanatory remark on the NOTES column of the SHIPPING table, you might issue the following statement:

COMMENT ON COLUMN shipping.notes
	IS 'Special packing or shipping instructions' 

To drop this comment from the database, issue the following statement:

COMMENT ON COLUMN shipping.notes IS '' 

Related Topics

The section "Comments" [*].


Contents Index Home Previous Next