(速度快,会把自增的主键重新开始,表结构还在。比如,原来有6条数据,主键自增(1-6),你执行了truncate table userInfo以后,再往里面加一条数据,主键为1。)
六、表修改语句(也需要记下来)
alter table student add birth date;
alter table student change birth birthday date ;
alter table student modify sex char(4) not null ;
alter table student modify sex char(2) after birthday;
alter table student rename as stu;
alter table stu drop birthday;