Wednesday, 4 March 2015

How To Add Comments on a Table

Add a Comments on a Table in Oracle

Use the comment statement to add to te data dictinary a comment about a table or table column,view.

To insert an explanatory remark on Employees table,you might issue the following statement.

COMMENT ON TABLE employees
IS 'Employee Information Mumbai '
/

To insert an explanatory remark on salary column of the Employees table,you might issue the following statement.

comment on column employee.salary is 'Salary of an employees';
/
How to get the table comments through sql statement.



select table_name, comments
from user_tab_comments
where table_name = 'EMPLOYEES'

To drop comment , issue follwing statement.

comment on column employees.salary is '';

Share this

0 Comment to "How To Add Comments on a Table"

Post a Comment