Comments on all tables and views in the database

Name Datatype Length Mandatory Comments
OWNER VARCHAR2 (30) Yes Owner of the object
TABLE_NAME VARCHAR2 (30) Yes Name of the object
TABLE_TYPE VARCHAR2 (11)   Type of the object
COMMENTS VARCHAR2 (4000)   Comment on the object


CURSOR cur_comment(c_name in dba_tables.table_name%type
                 , c_owner in dba_objects.owner%type)
  is select comments
     from dba_tab_comments
     where owner = c_owner
     and table_name = c_name
     and (table_type = 'TABLE'
          OR table_type = 'VIEW');