參考:數(shù)據(jù)庫中表id自增重置為1 方法一: truncate table tablename; //注意:有外鍵的表不能參與truncate操作 方法二: alter table tablename auto_increment=1;