mysql 主键只有一个,auto_increment 必须是键 Error Code: 1075

mysql 主键只有一个,auto_increment 必须是键.

Error Code: 1075. Incorrect table definition; 

there can be only one auto column and it must be defined as a key

auto column and is must be defined as a key (自增列,必须是一个键key)

create table `xx` (

`x_id` bigint unsigned not null auto_increment,

`xd_id`bigint unsigned not null comment '编号',

`x_com_id` varchar(20) not null default '' comment '',

 key(x_id),

 primary key(`x_com`,`xd_id`)

) engine=innodb default charset=utf8 comment 'xx';


你可能感兴趣的:(mysql,error,auto_increment,code:,1075)