How to Set Foreign Key Constraints in MySQL

Disable foreign key checks:
SET FOREIGN_KEY_CHECKS=0  

Enable foreign key checks:
SET FOREIGN_KEY_CHECKS=1  

Leave a Comment

Your email address will not be published.