直接修改就行db2 "select max(id) from test"如果id不是not null 需要修改为not nulldb2 alter table test alter column id set not null 修改为自增字段db2 "alter table test alter column id set generated always as identity (start with 3,increment by 1)"3为max...
显示全部直接修改就行
db2 "select max(id) from test"
如果id不是not null 需要修改为not null
db2 alter table test alter column id set not null
修改为自增字段
db2 "alter table test alter column id set generated always as identity (start with 3,increment by 1)"
3为max(id)+步长,1为步长
收起