DEV Community šŸ‘©ā€šŸ’»šŸ‘Øā€šŸ’»

Max Angelo Dapitilla Perin
Max Angelo Dapitilla Perin

Posted on

Answer: ERROR 1452: Cannot add or update a child row: a foreign key constraint fails

The Problem is with FOREIGN KEY Constraint. By Default (SET FOREIGN_KEY_CHECKS = 1). FOREIGN_KEY_CHECKS option specifies whether or not to check foreign key constraints for InnoDB tables. MySQL - SET FOREIGN_KEY_CHECKS

We can set foreign key check as disable before running Query. Disable Foreign key.

Execute one of theseā€¦

Top comments (0)

We want your help! Become a Tag Moderator.
Check out this survey and help us moderate our community by becoming a tag moderator here at DEV.