查看当前FOREIGN_KEY_CHECKS的值可用如下命令
SELECT @@FOREIGN_KEY_CHECKS;
SELECT @@FOREIGN_KEY_CHECKS;
清空表
SET
FOREIGN_KEY_CHECKS=0;
SET
FOREIGN_KEY_CHECKS=1;
SET
FOREIGN_KEY_CHECKS=0;
SET
FOREIGN_KEY_CHECKS=1;
转载于:https://www.cnblogs.com/you-jia/p/4644733.html