mysql执行truncate命令报错:Cannot truncate a table referenced in a foreign key constraint

SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE Table_Name;
SET FOREIGN_KEY_CHECKS = 1;
每天进步一点点~~~
原文地址:https://www.cnblogs.com/xingphimo/p/9585086.html