Skip to content

Instantly share code, notes, and snippets.

@sixertoy
Created February 17, 2015 10:03
Show Gist options
  • Save sixertoy/96615445478b9981afd5 to your computer and use it in GitHub Desktop.
Save sixertoy/96615445478b9981afd5 to your computer and use it in GitHub Desktop.
MySQL Truncate With Foreign Keys
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE table1;
TRUNCATE table2;
SET FOREIGN_KEY_CHECKS=1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment