search for foreign keys in mysql code example Example: turn on foreign keys check mysql SET FOREIGN_KEY_CHECKS=0;