1获取删除语句

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

 

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

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

posted on 2021-11-17 19:40  李大幽默  阅读(309)  评论(0编辑  收藏  举报