Those of you who have used the SYSCOLUMNS and SYSTABLES views must have noticed that there is a column called LONG_COMMENT. On the partitions I work on this column is usually null. What is purpose of this column? And how is it updated?
A quick search in IBM’s documentation introduced me to the COMMENT ON SQL statement. Before I give examples of how to use it, I am going to need a SQL DDL table to use:
01 CREATE OR REPLACE TABLE MYLIB.FIRST_TABLE
02 FOR SYSTEM NAME “TABLE1”
03 (FIRST_COLUMN FOR “FIRST” VARCHAR(20),
04 SECOND_COLUMN FOR “SECOND” VARCHAR(20))
05 ON REPLACE DELETE ROWS ;
06 LABEL ON COLUMN FIRST_TABLE (
07 FIRST_COLUMN IS ‘First col’,
08 SECOND_COLUMN IS ‘Column heading’
09 ) ;
10 LABEL ON COLUMN FIRST_TABLE (
11 FIRST_COLUMN TEXT IS ‘First column’,
12 SECOND_COLUMN TEXT IS ‘Column text’
13 ) ;
14 LABEL ON TABLE FIRST_TABLE IS ‘This is the first table’ ;
Read more »