Check out example codes for "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]". It will help you in understanding the concepts better.

Code Example 1

SET FOREIGN_KEY_CHECKS = 0; 

truncate table "yourTableName";

SET FOREIGN_KEY_CHECKS = 1;

Learn ReactJs, React Native from akashmittal.com