Skip to content

Instantly share code, notes, and snippets.

@anytizer
Created August 3, 2014 07:40
Show Gist options
  • Save anytizer/607ab212652ad5114c83 to your computer and use it in GitHub Desktop.
Save anytizer/607ab212652ad5114c83 to your computer and use it in GitHub Desktop.
Drop backup tables (that started with an underscore _).
SELECT CONCAT('DROP TABLE `', TABLE_NAME, '`;') DROP_QUERY FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME LIKE '\_%';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment