Thursday, November 20, 2008

syntax how to set comments on a table or a column

syntax how to set comments on a table or a column

If we want to give a comment on a table :

COMMENT ON TABLE IS 'the comments should go here';

If we want to give a comment on a column : COMMENT ON TABLE COLUMN table.columnIS 'the comments should go here';

The entries of these comments on the table goes in the following tables:
For tables:
select * from all_tab_comments where table_name ='table_name'
(or)
select * from user_tab_comments where table_name = 'table_name'

For Columns

select * from all_col_commentswhere table_name = 'table_name'
(or)
select * from user_col_commentswhere table_name = 'table_name'

1 comment:

Anonymous said...

i must thank you for the efforts you've put in penning this blog. excellent blog post .

www.n8fan.net