I thought this would be simple, but I can\'t seem to use AUTO_INCREMENT in my db2 database. I did some searching and people seem to be using \"Generated by Default\", but t
hi If you are still not able to make column as AUTO_INCREMENT while creating table. As a work around first create table that is:
create table student( sid integer NOT NULL sname varchar(30), PRIMARY KEY (sid) );
and then explicitly try to alter column bu using the following
alter table student alter column sid set GENERATED BY DEFAULT AS IDENTITY
Or
alter table student alter column sid set GENERATED BY DEFAULT AS IDENTITY (start with 100)