Last active
August 29, 2015 14:25
-
-
Save maztch/54079c46e7546b6b5648 to your computer and use it in GitHub Desktop.
mysql delete tables by prefix
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
SELECT CONCAT( 'DROP TABLE ', GROUP_CONCAT(table_name) , ';' ) | |
AS statement FROM information_schema.tables | |
WHERE table_name LIKE 'prefix_%'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment