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

来源:互联网 发布:淘宝双十一魔盒怎么用 编辑:程序博客网 时间:2024/06/01 07:44

        如下:

mysql> create table tbx(    -> id int unsigned not null  auto_increment,    -> score int not null    -> );ERROR 1075 (42000): Incorrect table definition; there can be only one auto column and it must be defined as a keymysql> 
       什么意思呢? 自增列只能有1列, 且这列必须为key,  如下便OK:

mysql> create table tbx(    -> id int unsigned not null  auto_increment primary key,    -> score int not null    -> );Query OK, 0 rows affected (0.01 sec)mysql> 

      good
   

阅读全文
1 0
原创粉丝点击