Skip to content

Instantly share code, notes, and snippets.

@sankars
Created April 29, 2014 06:12
Show Gist options
  • Select an option

  • Save sankars/11391807 to your computer and use it in GitHub Desktop.

Select an option

Save sankars/11391807 to your computer and use it in GitHub Desktop.
Mysql queries dealing with structures of tables and views
-- From http://stackoverflow.com/questions/5452760/truncate-foreign-key-constrained-table
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