SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
C-49
Examples—COMMENT
To delete a comment, replace all existing comments with a comment that consists
of an empty string. For example:
COMMENT ON VIEW PERSNL.MGRLIST IS "" CLEAR;
SQL stores comments as rows in the COMMENTS catalog table. You access them
by querying the table. Each new comment for an object is stored as a row with a
sequence number one greater than the highest existing sequence number for a
comment on that object.
An object can have 10,000 comments.
Examples—COMMENT
This statement adds a comment about a constraint:
COMMENT ON CONSTRAINT DATE_ASSRTN ON SALES.ORDERS
IS "Dates are stored as yymmdd.";
This statement replaces all comments on a table with a new comment:
COMMENT ON TABLE INVENT.PARTLOC
IS "This table is partitioned LOC_CODE."
CLEAR;
This statement displays comments and help text for a table:
SELECT * FROM SALES.COMMENTS
WHERE OBJNAME = "\SYS1.$VOL1.SALES.PARTS";