当前位置:首页 > 数据库 > 正文

mysql 删除以某字符串开头的表

2024-03-31 数据库

Select ‘SET FOREIGN_KEY_CHECKS = 0;‘
union
Select CONCAT( ‘drop table ‘, table_name, ‘;‘ )
FROM information_schema.tables
Where table_name LIKE ‘as_baiqishi%‘
UNION
Select ‘SET FOREIGN_KEY_CHECKS = 1;‘

  不多解释了,复制,执行,ok!

温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/SQL/12759.html