Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to view comment on tables?
HI -
Here is a UNIX script that you can use:
set feedback off verify off pause off
set pagesize 300
set und off
column comments word_wrap format a70 heading '' column owner noprint new_value owner_aliascolumn table_name noprint new_value table_name_alias
column column_name heading '' column blanks heading '' accept Table_name char prompt 'Enter Table name: '
spool $HOME/x.x
ttitle col 7 'Table Name: 'table_name_alias col 56 'Owner: 'owner_alias -
skip 2 select ' ' blanks, comments, owner, table_namefrom all_tab_comments
column comments word_wrap format a39 heading ''
ttitle off
select ' ' blanks, column_name, comments
from all_col_comments
where table_name = upper('&&Table_name')
and owner = user
/
spool off
exit
Later !!!
Oracleguru
www.oracleguru.net
oracleguru_at_mailcity.com
Cheong <ccheong_at_my.lhsgroup.com> wrote in article
<377c72bd_at_news.lhsgroup.com>...
> Hi there:
>
> Adding a comment onto a row of a table is quite straight forward for me:
>
> SQL> desc area
> Name Null? Type
> ------------------------------- -------- ----
> AREA_ID NOT NULL NUMBER(38)
> AREA_DEF VARCHAR2(1)
> REC_VERSION NOT NULL NUMBER(38)
>
> SQL> comment on column area.area_def
> 2 is 'Whatever it is';
>
> Comment created.
>
> Viewing the comment is NOT so easy for me:
>
> SQL> select *
> 2 from dict
> 3 where table_name = 'AREA';
>
> no rows selected
>
> Whatever is happening to the comment on row "area_def" of table "area"
which
> I have just created??
>
> Oracle7 Server SQL Reference says, "Comments associated with schema
objects
> are stored in the data dictionary."
>
> Can someone please point out to me what have I missed?
>
> Thanks a bunch!!
>
> Regards,
> Cheong
> ccheong_at_my.lhsgroup.com
>
>
>
Received on Fri Jul 02 1999 - 10:15:04 CDT
![]() |
![]() |