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

  sre

create table student(id INT AUTO_INCREMENT, name VARCHAR(200) NOT NULL) ENGINE=INNODB CHARSET=utf8;

报错是:

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

必须是key才能自增

LEAVE A COMMENT

Captcha Code