In an ALTER TABLE statement, the column "ID" has been specified as NOT NULL and either the DEFAULT clause was not specified or was specified as DEFAULT NULL.. SQLCODE=-193, SQLSTATE=42601

今天在为db2数据库表的id字段设置主键是报193;

网上查了很多资料说停止服务,然后重启;试了,但没用!

最后还是发现了我表里有还新增的空数据

 

 

才导致我设置不了id字段为非空,从而设置不了为主键 ( ̄ー ̄〃)

 

posted @ 2021-07-12 16:14  Hello小码  阅读(525)  评论(0编辑  收藏  举报