1075 - Incorrect table definition;there can be only one auto column and it must be defined as a key

异常信息

1075 - Incorrect table definition;there can be only one auto column and it must be defined as a key
在这里插入图片描述

场景描述

创建表的时候
在这里插入图片描述

异常原因

建表时id,勾选自动递增,不是null,但是没有将其设置成为主键


解决方案

将表中的id定义成主键
在这里插入图片描述

参考资料

这里是引用

猜你喜欢

转载自blog.csdn.net/qq_33840251/article/details/89765915
今日推荐