Thursday, March 9, 2023

Drop all tables in mysql

This sql clause will generate drop clauses

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

Get result and paste to command line

No comments: