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才能自增

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code