求大神解答!!删除操作只会删除父表中的记录,子表的记录依然存在。这是咋回事?
出现ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constrai nt fails (`t1`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`pid`) REFERENCES `father` (`id`))错误。执行mysql> SET FOREIGN_KEY_CHECKS = 0;mysql> SET FOREIGN_KEY_CHECKS = 1;后再继续删除操作只会删除父表中的记录,子表的记录依然存在。这是咋回事?