Last active
June 26, 2017 14:20
-
-
Save bannostookaylo/22caf95abe82494e1d4804c9cde17b72 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Drop (i.e. remove tables) | |
mysql -Nse 'show tables' DATABASE_NAME | while read table; do mysql -e "drop table $table" DATABASE_NAME; done; | |
## Truncate (i.e. empty tables) | |
mysql -Nse 'show tables' DATABASE_NAME | while read table; do mysql -e "truncate table $table" DATABASE_NAME; done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment