mysql刪除固定前綴的表

Select CONCAT( 'drop table ', table_name, ';' ) 
FROM information_schema.tables 
Where table_name LIKE 'as_%';

  列出來,全部,再執行sql

SET FOREIGN_KEY_CHECKS = 0;
-- DROP語句
drop table as_tongdun_loanevent_and_hitrules_out;
drop table as_tongdun_loanevent_and_outputfields_out;
drop table as_tongdun_loanevent_and_policyresult_out;
drop table as_tongdun_loanevent_and_policyresult_policysethitrule_out;
SET FOREIGN_KEY_CHECKS = 1;

 SET FOREIGN_KEY_CHECKS = 0spa

-- DROP語句 code

SET FOREIGN_KEY_CHECKS = 1;orm

相關文章
相關標籤/搜索