Example
create table friend_request
(
friend_request_ID int auto_increment,
request_num int default 0 not null,
user_name_sent varchar(20) not null,
id_sent int not null,
id_received int not null,
is_received bool default 0 not null
);
alter table friend_request
add constraint friend_request_pk
primary key (friend_request_ID);
出现如下错误
[42000][1075] Incorrect table definition; there can be only one auto column and it must be defined as a key.
要手动把语句改成这样
friend_request_ID int auto_increment PRIMARY KEY,