Answers for "Cannot add or update a child row: a foreign key constraint fails"

1

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

SET FOREIGN_KEY_CHECKS=0
Posted by: Guest on July-09-2021
0

mysql error 1452

SELECT child_table.* 
FROM child_table 
LEFT JOIN parent_table 
  ON parent_table.referenced_column = child_table.referencing_column 
WHERE parent_table.referenced_column IS NULL


-- Delete all data from output of that query
Posted by: Guest on August-28-2020

Code answers related to "Cannot add or update a child row: a foreign key constraint fails"

Browse Popular Code Answers by Language