SELECT concat('DROP TABLE IF EXISTS ', table_name, ';') FROM information_schema.tables WHERE table_schema = 'mydb';
mydb换成你想删除的数据库的名字
SELECT concat('DROP TABLE IF EXISTS ', table_name, ';') FROM information_schema.tables WHERE table_schema = 'mydb';
mydb换成你想删除的数据库的名字
转载于:https://www.cnblogs.com/vipchenwei/p/7767294.html