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

Posted 凯小默

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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的主要内容,如果未能解决你的问题,请参考以下文章

Incorrect key file for table './xx_db/xx_table.MYI'; try to repair it

Incorrect key file for table ' '; try to repair it

1075 - Incorrect table definition there can be only one auto

Incorrect key file for table '/tmp/#sql_882_0.MYI'; try to repair it

记录:MySQL报错1075 - Incorrect table defintion;there can be only...解决方案

Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT