Skip to content

Instantly share code, notes, and snippets.

@simonswine
Created November 8, 2014 12:02
Show Gist options
  • Save simonswine/faad01dd4ec6b8577be6 to your computer and use it in GitHub Desktop.
Save simonswine/faad01dd4ec6b8577be6 to your computer and use it in GitHub Desktop.
Shell oneliner drop all tables from xx
mysql -e "SELECT concat('DROP TABLE IF EXISTS ', table_name, ';') FROM information_schema.tables WHERE table_schema = 'xx';" | tail -n +2 | mysql xx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment