Skip to content

Instantly share code, notes, and snippets.

@fernandovega
Created November 26, 2016 14:32
Show Gist options
  • Save fernandovega/2a9896d47e797c52b751f5d31474efe8 to your computer and use it in GitHub Desktop.
Save fernandovega/2a9896d47e797c52b751f5d31474efe8 to your computer and use it in GitHub Desktop.
Truncate all tables in db
SET FOREIGN_KEY_CHECKS=0;
SELECT Concat('TRUNCATE TABLE ',table_schema,'.',TABLE_NAME, ';') FROM INFORMATION_SCHEMA.TABLES where table_schema in ('sectorvisual');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment