AUTO_INCREMENT values will be reused if you delete the row with the biggest AUTO_INCREMENT value in any group. So,empty the table if you want to count from 1 again on a column with AUTO_INCREMENT values . Is it what do you want ?
alter table tablename auto_increment=1;
alter table tablename auto_increment=1;
本文介绍如何将数据库表中的AUTO_INCREMENT计数器重置为1,包括清空表的方法及使用ALTER TABLE语句来直接设置AUTO_INCREMENT值。
1984

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



