MySql重置自增Id的值

方法1(好处是运行速度超快):rem

truncate table test(你的表名);table

方法2(好处是能够从任何值开始,缺点是若是数据量大的话delete from test;很是耗时):test

delete from test(你的表名);
alter table `test(你的表名)` auto_increment=1;方法

相关文章
相关标签/搜索