How to delete a record when two tables have foreign key referenced to each other?

Posted by vps on Server Fault See other posts from Server Fault or by vps
Published on 2010-02-27T10:46:07Z Indexed on 2010/04/08 12:03 UTC
Read the original article Hit count: 240

Filed under:
|

Delete any record of them will report an error like this:

ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails

How to overcome this problem?

© Server Fault or respective owner

Related posts about sql

Related posts about foreign-key