Last active
April 1, 2016 16:54
-
-
Save InvisibleKind/38922c66000da6a7a9bc40fc0866be4f to your computer and use it in GitHub Desktop.
Drop all db tables
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
SET SESSION group_concat_max_len = 1000000; | |
SELECT GROUP_CONCAT(r1.query SEPARATOR "\n") AS copy_and_paste FROM (SELECT concat("DROP TABLE IF EXISTS ", table_name, ";") AS query FROM information_schema.tables WHERE table_schema = "my-db-name") AS r1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment