Skip to content

Instantly share code, notes, and snippets.

@aalipar13
Created August 28, 2018 06:05
Show Gist options
  • Save aalipar13/a5d6e753243f5420a9d82602824e144e to your computer and use it in GitHub Desktop.
Save aalipar13/a5d6e753243f5420a9d82602824e144e to your computer and use it in GitHub Desktop.
Cannot truncate a table referenced in a foreign key constraint
# Cannot truncate a table referenced in a foreign key constraint
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE <table>;
SET FOREIGN_KEY_CHECKS=1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment