4. Managing Tables and Views : Synonyms, Temporary Tables, and Comments : Comments to Describe Tables and Views : The Comment On Statement
 
Share this page                  
The Comment On Statement
The COMMENT ON statement allows you to add commentary to SQL programs. Using this statement, you can create a comment for the table as a whole and for individual columns in the table.
For example, to add a remark on the name column and on the status column of the employee table:
COMMENT ON COLUMN employee.name IS
  'name in the format: lastname, firstname';

COMMENT ON COLUMN employee.status IS
  'valid codes are:
     01, exempt; 02, non-exempt; 03, temp';
To delete a comment, specify an empty string. For example, the comment on the status column can be deleted by the statement:
COMMENT ON COLUMN employee.status IS '';
For complete details, see the comment on statement in the SQL Reference Guide.