Home

You are most welcome to share your knowledge with me, send your comments about this training.

SQL QUERIES

Thursday, 1 January 2015

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 '';

No comments:

Post a Comment