Skip to content

Instantly share code, notes, and snippets.

@gaulatti
Created May 12, 2014 16:53
Show Gist options
  • Save gaulatti/9bbfff51a9188dcd1b8c to your computer and use it in GitHub Desktop.
Save gaulatti/9bbfff51a9188dcd1b8c to your computer and use it in GitHub Desktop.
Select Tables for drop in MySQL
SELECT concat('DROP TABLE IF EXISTS ', table_name, ';')
FROM information_schema.tables
WHERE table_schema = 'MyDatabaseName';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment