Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts

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