mysql没有现成的工具可以实现批量删除相同前缀的表,所以我们可以通过构造语句来进行删除;
首先通过以下语句构造出要执行的删除语句
SELECT CONCAT( 'drop table ', table_name, ';' )
FROM information_schema.tables
WHERE tablename LIKE 'ot%';
CONCAT( 'drop table ', table_name, ';' )
drop table ot_ad;
drop table ot_banner;
drop table ot_collhistory;
drop table ot_collitem;
drop table ot_collresult;
drop table ot_colltype;
drop table ot_dbbak;
drop table ot_dberr;
drop table ot_filedata;
drop table ot_filever;
drop table ot_info;
drop table ot_infocontent1;
drop table ot_infomessage;
drop table ot_infomove;
drop table ot_infosys;
drop table ot_infotype;
drop table ot_infoweb;
drop table ot_keyword;
drop table ot_makediy;
drop table ot_member;
drop table ot_membergroup;
drop table ot_memberlog;
drop table ot_memberonline;
drop table ot_menufile;
drop table ot_menutree;
drop table ot_message;
drop table ot_paysoft;
drop table ot_sysadmin;
drop table ot_sysimages;
drop table ot_system;
drop table ot_template;
drop table ot_tplsys;
drop table ot_type;
drop table ot_upfile;
drop table ot_userapi;
drop table ot_userfile;
drop table ot_usergroup;
drop table ot_userip;
drop table ot_userlevel;
drop table ot_useronline;
drop table ot_users;
drop table ot_userscore;
drop table ot_usersys;
然后复制该结果将该结果放入sql的可视化工具执行即可
失落的羊2024-12-01 15:43
研究插件:挂载点研究、文件读写研究、API读取数据、设置、前台显示
失落的羊2024-11-14 22:06
今日申请十年之约博客成员!
失落的羊2024-11-02 21:34
启用新的访问统计.
失落的羊2024-10-28 23:31
重新整理长篇连载栏目
失落的羊2024-10-19 10:35
构思公众号文章迁移计划