Created
July 21, 2015 14:21
-
-
Save traedamatic/389200b473dabde4972b to your computer and use it in GitHub Desktop.
generate drop all tables sql
This file contains hidden or 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
//@see http://stackoverflow.com/a/8248281 | |
SET FOREIGN_KEY_CHECKS = 0 | |
SELECT concat('DROP TABLE IF EXISTS ', table_name, ';') FROM information_schema.tables WHERE table_schema = 'MyDatabaseName'; | |
SET FOREIGN_KEY_CHECKS = 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment