Skip to content

Instantly share code, notes, and snippets.

@cboden
Created March 15, 2012 15:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cboden/2044871 to your computer and use it in GitHub Desktop.
Save cboden/2044871 to your computer and use it in GitHub Desktop.
Truncate Foreign Key'd Tables
SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE `table1`;
TRUNCATE TABLE `table2`;
SET FOREIGN_KEY_CHECKS = 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment