批量删除 mysql 数据表

1获取删除语句

Select CONCAT( 'drop table ', table_name, ';' )
FROM information_schema.tables
Where table_schema=数据库名'  table_name LIKE '模糊表名%';

 

例子 :  获取mydatabase 库 下的所有 ‘’sql_‘’开头的表的删除语句;

Select CONCAT( 'drop table ', table_name, ';' )
FROM information_schema.tables
Where table_schema='mydatabase'  table_name LIKE ' sql_%';

 

2 复制 输出的结果 再运行删除

posted @ 2017-11-30 18:17  太菜  阅读(19289)  评论(1编辑  收藏  举报