To write the posts for this website I need to have examples DDL tables. I often use a Table whose first column contains the row number and a second contains some kind of random number.
While I was illustrating how to fill one of these tables it struck me that there was an easier way to do this, having all the logic in the Insert statement itself.
This is the source code for the Table I commonly use:
01 CREATE TABLE MYLIB.FIRST_TABLE 02 FOR SYSTEM NAME "TABLE1" 03 (FIRST_COLUMN FOR COLUMN "FIRST" VARCHAR(10), 04 SECOND_COLUMN FOR COLUMN "SECOND" SMALLINT, 05 UNIQUE (FIRST_COLUMN)) ; |