约束字段为自动增长,被约束的字段必须同时被key约束

没有设置成primary key 时,会报错。

ERROR 1075 (42000): Incorrect table definition; there can be only one auto column and it must be defined as a key

加上primary key 则设置成功。

ERROR 1075 (42000): Incorrect table definition; there can be only one auto column and it must be defined as a key

 

相关文章:

  • 2021-06-20
  • 2021-12-01
  • 2022-12-23
  • 2021-11-05
  • 2022-01-13
  • 2021-09-05
  • 2022-01-11
  • 2021-07-07
猜你喜欢
  • 2021-06-02
  • 2021-11-18
  • 2022-12-23
  • 2022-12-23
  • 2021-10-26
  • 2021-06-10
  • 2021-08-28
相关资源
相似解决方案