约束字段为自动增长,被约束的字段必须同时被key约束 没有设置成primary key 时,会报错。 加上primary key 则设置成功。 转载于:https://www.cnblogs.com/Zhao159461/p/10758868.html