删除数据表的数据后,发现下次插入数据,主键id并没有重置,还是在原来基础上继续增加
SET FOREIGN_KEY_CHECKS = 0; TRUNCATE table table_name; SET FOREIGN_KEY_CHECKS = 1;
https://stackoverflow.com/questions/5452760/how-to-truncate-a-foreign-key-constrained-table