数据库报错:Incorrect table definition; there can be only one auto column and it must be defined as a key

Incorrect table definition; there can be only one auto column and it must be defined as a key
不正确的表定义;只能有一个自动列,必须将其定义为键

创建数据库时候:

设为自增的字段必须是主键,而我用的是客户端,表是批量从SQLServer复制到MySQL的,导致最后MySQL表中主键丢失,设置id为主键并设为自增后,保存成功,问题解决。

由廖圣平博客整理

查看原文

猜你喜欢

转载自blog.csdn.net/qq_22823581/article/details/80909241
今日推荐