"generated by default" means:
if user supplies a value, use that value,
if user supplies no value, generate an value ( starting with 1 and increment by 1 ).
INSERT INTO t1 VALUES (1, 'ABC')
is accepted. User supplied a value, row is inserted:
table contains:
id , c1
------
1 , 'ABC'
next insert is:
INSERT INTO t1 VALUES (5, 'DEF')
insert is accepted. table now contains:
id , c1
------
1 , 'ABC'
5 , 'DEF'
next insert is:
INSERT INTO t1(c1) VALUES ('XYZ')
Db2 acts: "ohh, no value is supplied for column id - I have to generate a value. Let me see, I have to start with value: 1" and inserts a row with id=1
new table content is:
id , c1
------
1 , 'ABC'
5 , 'DEF'
1 , 'XYZ'
( of course, if there is a unique index on id, that insert will fail due to duplicate key)