Skip to content

Instantly share code, notes, and snippets.

@glafarge
Created August 22, 2016 12:57
Show Gist options
  • Save glafarge/23f33979ec0445609cfd5fa78e2e64d9 to your computer and use it in GitHub Desktop.
Save glafarge/23f33979ec0445609cfd5fa78e2e64d9 to your computer and use it in GitHub Desktop.
Disable temporary the SQL check for constraints
SET FOREIGN_KEY_CHECKS = 0; -- Disable foreign key checking.
TRUNCATE TABLE forums;
TRUNCATE TABLE dates;
TRUNCATE TABLE remarks;
SET FOREIGN_KEY_CHECKS = 1; -- Enable foreign key checking.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment