Skip to content

Instantly share code, notes, and snippets.

@hanvari
Last active August 29, 2015 14:06
Show Gist options
  • Save hanvari/16c6cad5a8bd03c595b0 to your computer and use it in GitHub Desktop.
Save hanvari/16c6cad5a8bd03c595b0 to your computer and use it in GitHub Desktop.
MySQL Disable foreign-key checks to truncate a table
SET FOREIGN_KEY_CHECKS=0;
truncate table schema.table ;
SET FOREIGN_KEY_CHECKS=1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment