-2

I have used the following statement to add the comment:

comment on column employee.first_name is 'first name of the employee table';

No I have difficulty in knowing how to use all_col_comments and user_col_comments to view the above comment using select statement.

Lalit Kumar B
  • 47,486
  • 13
  • 97
  • 124
  • I get the result if for all the tables when I use the query "select * from user_col_comments". However I want to retrieve the output only for employee table. – Pradeep Joshi Mar 29 '15 at 06:46
  • Hi, have you come across the `WHERE` clause before? You can restrict this to `where table_name = 'EMPLOYEE'`. I would highly recommend doing some basic online tutorials first... – Ben Mar 29 '15 at 08:11

1 Answers1

2

Simply use the table_name in the filter predicate.

For example,

select * from all_col_comments where table_name = 'EMPLOYEE';

The view has four columns:

  • OWNER
  • TABLE_NAME
  • COLUMN_NAME
  • COMMENTS

Read more about the view in documentation.

Lalit Kumar B
  • 47,486
  • 13
  • 97
  • 124