Skip Headers

Oracle9i SQL Reference
Release 2 (9.2)

Part Number A96540-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

SQL Statements: ALTER TRIGGER to COMMIT , 10 of 11


COMMENT

Purpose

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 ' '.

See Also:

Prerequisites

The object about which you are adding a comment must be in your own schema or:

Syntax

comment::=

Text description of statements_420.gif follows
Text description of comment


Keywords and Parameters

TABLE Clause

Specify the schema and name of the table, view, or materialized view to be commented. If you omit schema, then Oracle assumes the table, view, or materialized view is in your own schema.

COLUMN Clause

Specify the name of the column of a table, view, or materialized view to be commented. If you omit schema, then Oracle assumes the table, view, or materialized view is in your own schema.

IS 'text'

Specify the text of the comment.

See Also:

"Text Literals" for a syntax description of 'text'

OPERATOR Clause

Specify the name of the operator to be commented. If you omit schema, then Oracle assumes the operator is in your own schema.

INDEXTYPE Clause

Specify the name of the indextype to be commented. If you omit schema, then Oracle assumes the indextype is in your own schema.

Example

Creating Comments: 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 ' '; 

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback