Friday, May 13, 2022

Drop all tables, MySQL

Drop all tables, MySQL.

SELECT concat('DROP TABLE IF EXISTS `', table_name, '`;') FROM information_schema.tables WHERE table_schema = 'MyDatabaseName';

Copy and paste the result and run it.

0 comments:

Post a Comment

Delicious Digg Stumbleupon Favorites