Created
September 2, 2014 10:40
-
-
Save sylvaincombes/c0795cd07d3c641a7bc6 to your computer and use it in GitHub Desktop.
Mysql disable foreign key
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- disable | |
SET FOREIGN_KEY_CHECKS = 0; | |
-- truncate for example | |
TRUNCATE mytable; | |
-- enable | |
SET FOREIGN_KEY_CHECKS = 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment