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;

 

posted @ 2018-09-04 16:10  phimo  阅读(578)  评论(0编辑  收藏  举报