Created
June 22, 2015 09:35
-
-
Save madebyallie/c003e9e820aaf56b6fc1 to your computer and use it in GitHub Desktop.
SQL statement to truncate a MySQL table that has foreign keys
This file contains hidden or 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
SET FOREIGN_KEY_CHECKS = 0; | |
TRUNCATE table_name; | |
SET FOREIGN_KEY_CHECKS = 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment