Created
February 7, 2018 00:45
-
-
Save janetlee/f892f7e0ab2788cda5ab8b629558d29d to your computer and use it in GitHub Desktop.
How to truncate a constrained table in MySQL
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
SET FOREIGN_KEY_CHECKS = 0; | |
TRUNCATE table $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