create table ceyan(ID int not null auto_increment,
name varchar(20), primay key (ID));
insert into ceyan(name) values('wei xie'),('chunjiezhao'),('fei dou');
插入的值数据库会自动给他们编号;
对已经存在的表articles想修改字段arti_ID为auto_increment必须首先将他定义成primary key,再设置auto_increment;
alter table articles modify arti_ID int not null;
alter table articles add primary key arti_ID;
alter table articles modify arit_ID int not null auto_increment;