The COMMENT statement allows you to set a remark (comment) for an object in the database. The COMMENT statement updates remarks
listed in the ISYSREMARKS system table. You can remove a comment by setting it to NULL. For a comment on an index or trigger,
the owner of the comment is the owner of the table on which the index or trigger is defined.
You cannot add comments for local temporary tables.
If you use the Database Documentation Wizard to document your SQL Anywhere database, you have the option to include the comments for procedures, functions, triggers,
events, and views in the output. See Documenting a database.
The following examples show how to add and remove a comment.
Add a comment to the Employees table.
COMMENT
ON TABLE Employees
IS 'Employee information';
Remove the comment from the Employees table.
COMMENT
ON TABLE Employees
IS NULL;
To view the comment set for an object, use a SELECT statement similar to the following. This example retrieves the comment
set for the ViewSalesOrders view in the SQL Anywhere sample database.
SELECT remarks
FROM SYSTAB t, SYSREMARK r
WHERE t.object_id = r.object_id
AND t.table_name = 'ViewSalesOrders';