Mysql 主键删除一行后不连续的问题
重置表product 的自增ID
set @i=0;
update product set product.id=(@i:=@i+1);
设置表xxx的下一个自增ID为10000
alter table xxx AUTO_INCREMENT=10000;
重置表product 的自增ID
set @i=0;
update product set product.id=(@i:=@i+1);
设置表xxx的下一个自增ID为10000
alter table xxx AUTO_INCREMENT=10000;