Oracle View Comments: Add Column Descriptions

In Oracle, you can use the COMMENT command to add comments to fields in a view. For example, to add a comment to the field EMPLOYEE_ID in a view named EMPLOYEES, you can execute the following command:

COMMENT ON COLUMN EMPLOYEES.EMPLOYEE_ID IS 'Employee ID';

By doing so, the “Employee ID” comment was added to the EMPLOYEE_ID field. You can repeat this process for other fields in the view as needed. You can also use the DESCRIBE command to see the field comments for the view.

DESCRIBE EMPLOYEES;

This will display all fields of the EMPLOYEES view along with their annotations.

bannerAds