清空具有外键约束的表时报ERROR 1701(42000)的解决 -电脑资料

电脑资料 时间:2019-01-01 我要投稿
【www.unjs.com - 电脑资料】

   

    ERROR 1701 (42000): Cannot truncate a table referenced in a foreign key

    constraint (`furion`.`tbl_frn_alert`, CONSTRAINT `FK353A3CBEB139CC08`

    FOREIGN KEY (`endpt_id`) REFERENCES `furion`.`tbl_frn_endpt` (`id`))

    解决方法:

    mysql> SET foreign_key_checks=0;

    删除后

    mysql> SET foreign_key_checks=1;

最新文章