//清空id
alter table yc_cur drop id;
//重新生成
alter table yc_cur add id int not null primary key auto_increment first;
本文介绍了一种在数据库表中清空现有ID并重新生成的方法。通过使用SQL语句,首先清空yc_cur表中的ID,然后添加新的ID字段作为主键并设置为自动递增。
//清空id
alter table yc_cur drop id;
//重新生成
alter table yc_cur add id int not null primary key auto_increment first;

被折叠的 条评论
为什么被折叠?