mysql delete table starting with a string

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'

  Not much to explain, copy, execute, ok!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324746991&siteId=291194637
Recommended