Table, view or collumn comments
                                                 Last update (2008-05-16 21:47:23)
                                                                                                                   Date added (2008-05-16 21:23:14)

Summary
In the database dictionary, table or view and collumn comments are stored in views DBA_TAB_COMMENTS and DBA_COL_COMMENTS
SELECT OBJECT_NAME FROM DBA_OBJECTS 
WHERE OBJECT_NAME LIKE 'DBA_%COMMENTS%' 
AND OWNER = 'SYS';

OBJECT_NAME
------------------------
DBA_COL_COMMENTS
DBA_TAB_COMMENTS
DBA_OPERATOR_COMMENTS
DBA_INDEXTYPE_COMMENTS
DBA_MVIEW_COMMENTS
For example to see the comments for view DBA_ROLES:
SELECT * FROM DBA_TAB_COMMENTS
WHERE TABLE_NAME = 'DBA_ROLES';

OWNER          TABLE_NAME          TABLE_TYPE   COMMENTS
----------------------------------------------------------------------------------------
SYS                DBA_ROLES        VIEW         All Roles which exist in the database
To find the collumn comments of the view DBA_ROLES
SELECT * FROM DBA_COL_COMMENTS 
WHERE table_name = 'DBA_ROLES';

OWNER TABLE_NAME         COLUMN_NAME              COMMENTS
-----------------------------------------------------------------------------------------------------------
SYS      DBA_ROLES          ROLE                             ROLE NAME
SYS      DBA_ROLES          PASSWORD_REQUIRED  Indicates IF THE ROLE requires a PASSWORD TO be enabled
If you want to add comments in a table or collumn use the following syntax
COMMENT ON TABLE TABLE_NAME IS 'this is a test comment on table';
COMMENT ON COLUMN TABLE_NAME.COLLUMN_NAME IS 'this is a test comment on collumn';
You can drop a table comment, you simply do an edit to nothing
COMMENT ON TABLE TABLE_NAME IS '';
Reviews
Categories
Oracle DBA-> (147)
  Alertlog (3)
  Archivelog (5)
  Auditing (1)
  Backup - Recovery (19)
  Database files (6)
  Database options (2)
  DB links (2)
  Dependencies (1)
  Dictionary (2)
  Exp-Imp Datapump (6)
  Jobs (2)
  Mview (2)
  Networking (3)
  Objects (7)
  Parameters (2)
  Redologs (6)
  Roles - Grants (2)
  Rollback - Undo (8)
  Segments (3)
  Sequences (2)
  Sessions (14)
  SGA (14)
  Tables (10)
  Tablespaces (10)
  Temp (4)
  Toad (5)
  Transactions (1)
  Upgrade (2)
  Users (3)
Oracle APPS DBA-> (66)
Exadata (1)
Performance Tuning-> (59)
Oracle Real Cases (24)
Oracle Errors (23)
Oracle SQL tricks (32)
Oracle RAC (3)
Oracle Security (8)
Filters
Search