Previous Topic: Adding and Replacing CommentsNext Topic: Example Output Member


Example Source Member

The following example shows a COMMENT ON statement added to an existing table:

=> => => ------------------------------------------------------------------------------- Interactive SQL Service Facility SQLMAINT Source Panel S01S EDIT Member: DEPTCMNT Output Line Limit: 01000 Person: JONES Current Authid: JONES Description: DEPTTBL COMMENT ------------------------------------------------------------------------------- ====== ========================== T O P ======================================= 000001 comment on table depttbl ...... is 'reflects 1st qtr 99 reorganization'; ====== ======================= B O T T O M ==================================== PF1=HELP PF2=END PF3=SPLIT PF4=PROCESS PF5=TOP PF6=BOTTOM PF7=BACKWARD PF8=FORWARD PF9=EXECUTE PF10=LEFT PF11=RIGHT PF12=ALTERNATE

The statement COMMENT ON is required. In this example, TABLE is also required since the comment is being added for a table. (If the comment is for a view, the keyword VIEW is required, and if the comment is for a column, the keyword COLUMN is required.) The TABLE keyword is followed by the name of the table. The required keyword IS introduces the comment, which must be enclosed in apostrophes since it is a literal string.

The COMMENT ON statement also allows you to add comments for more than one column in a table. For more information on this special syntax and the COMMENT ON statement in general, see COMMENT ON.

After placing your SQL statement in the numbered line area on the Source Panel, you can perform the following: