About table and Column Comments [message #370977] |
Thu, 27 July 2000 17:58 |
Suresh.N
Messages: 41 Registered: March 2000
|
Member |
|
|
Hi,
We can store the comments about column and table if you are using any tool for creating table.
How can I add a commnets about column and table while
using create table script.
I used to see the comments by using one system table. But I forgot the table name. How can i see the comments with table structure.
Thanks in Advance
Suresh
|
|
|
Re: About table and Column Comments [message #370978 is a reply to message #370977] |
Thu, 27 July 2000 18:53 |
Andrew again...
Messages: 270 Registered: July 2000
|
Senior Member |
|
|
Fist select * from dict to see what other useful tables you may need. Knowing what's available will help a lot. Look at ALL_TAB_COMMENTS and ALL_COL_COMMENTS.
Add comments as follows:
comment on table emp is 'Info on EMPLOYEES is stored here';
comment on column emp.name is 'EMPLOYEE NAME e.g. Jones';
Reset as follows:
comment on table emp is '';
Select comments from all_tab_comments where table_name = 'EMP;
|
|
|
Re: About table and Column Comments [message #370979 is a reply to message #370977] |
Fri, 28 July 2000 04:38 |
Venkata Krishnayya Kommu
Messages: 13 Registered: July 2000
|
Junior Member |
|
|
Dear Suresh ,
You can comment a column by the following syntax :
comment on column table.column is ' comment'.
Also the following is the script to find the structure and comments on on the tables in the schema.
select a.table_name,b.comments, a.column_name,a.comments,c.data_type,c.nullable,c.data_length,c.data_scale , c.data_precision from user_col_comments a, user_tab_comments b, user_tab_columns c
where (a.comments is not null or b.comments is not null)
and b.table_name = a.table_name
and b.table_name = c.table_name
and a.column_name = c.column_name
order by a.table_name,a.column_name
|
|
|
Re: About table and Column Comments [message #370981 is a reply to message #370979] |
Fri, 28 July 2000 12:17 |
Suresh.N
Messages: 41 Registered: March 2000
|
Member |
|
|
Hi Venkat,
Thanks for reply.
As you said I can able to add a comments for column. But I would like to add the comments
while creating the table.
Like
Create Table Test (Name Varchar2(10)
/* This Name col is for storing the name values */
);
Is it is possible ?.
Have a Good Day!
Thanks
Suresh
|
|
|