SQL 错误 [1075] [42000]: Incorrect table definition; there can be only one auto column and it must be defined as a key

永远抱着学徒的心 / 2023-07-15 / 原文

SQL 错误 [1075] [42000]: Incorrect table definition; there can be only one auto column and it must be defined as a key

删除自增属性id,且改字段设置为唯一主键时,报上面的错误

解决办法:先去除该字段的自增属性再删除