Answers for "(conn=139) cannot truncate a table referenced in a foreign key constraint (`fanicom_db2`.`permissions`, constraint `permissions_ability_id_foreign` foreign key (`ability_id`) references `fanicom_db2`.`abilities` (`id`))."

SQL
0

Cannot truncate a table referenced in a foreign key constraint (`video_clips`.`channel_clips`, CONSTRAINT `clips_fk` FOREIGN KEY (`clip_id`) REFERENCES `video_clips`.`clips` (`id`)) in sql]

SET FOREIGN_KEY_CHECKS = 0; 

truncate table "yourTableName";

SET FOREIGN_KEY_CHECKS = 1;
Posted by: Guest on July-28-2020

Code answers related to "(conn=139) cannot truncate a table referenced in a foreign key constraint (`fanicom_db2`.`permissions`, constraint `permissions_ability_id_foreign` foreign key (`ability_id`) references `fanicom_db2`.`abilities` (`id`))."

Code answers related to "SQL"

Browse Popular Code Answers by Language