Oracle8i SQL Reference
Release 3 (8.1.7)

Part Number A85397-01

Library

Product

Contents

Index

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

SQL Statements:
ALTER TABLE to constraint_clause, 12 of 14


COMMENT

Purpose

Use the COMMENT statement to add a comment about a table, view, snapshot, 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 table, view, or snapshot must be in your own schema or you must have COMMENT ANY TABLE system privilege.

Syntax


Keywords and Parameters

TABLE

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 snapshot is in your own schema.

COLUMN

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

IS 'text'

Specify the text of the comment.

See Also: "Text" for a syntax description of 'text' 

Example

COMMENT 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 ' '; 

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

All Rights Reserved.

Library

Product

Contents

Index