Skip to content

Instantly share code, notes, and snippets.

@there4
Created November 4, 2012 18:37
Show Gist options
  • Save there4/4012937 to your computer and use it in GitHub Desktop.
Save there4/4012937 to your computer and use it in GitHub Desktop.
MySQL drop tables by wildcard
mysqldump -u username -p --add-drop-table --no-data dbname | grep "^DROP.*\`xx_" | mysql -u username -p dbname
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment