码迷,mamicode.com
首页 > 数据库 > 详细

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

时间:2020-01-27 17:26:47      阅读:323      评论:0      收藏:0      [点我收藏+]

标签:orm   select   class   ike   开头   ati   tab   sql   删除   

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!

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

标签:orm   select   class   ike   开头   ati   tab   sql   删除   

原文地址:https://www.cnblogs.com/hl15/p/12236291.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!