,

MySQL force delete rows

Ahmad Avatar

MySQL check if there is a relation between rows before deleting it

it will raise an error

can’t delete or update a parent row

we need to till mysql to stop this check

SET FOREIGN_KEY_CHECKS = 0

to reactivate it

SET FOREIGN_KEY_CHECKS =1

 

enjoy

Enjoying this article?

Subscribe to get new posts delivered straight to your inbox. No spam, unsubscribe anytime.

No spam. Unsubscribe anytime.

You may also like

See All blog →

Leave a Comment

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.