mysql批量清除表数据的sql生成
【目的】
truncate table xxx;
希望把表名中包含sell的表,全部truncate了。
【操作】
利用sql语句,批量生成truncate的sql,然后一次性运行。
select distinct CONCAT(‘truncate table ’,table_name,',')from information_schema.`TABLES` where table_name like ‘%sell%’
【参考】
https://blog.csdn.net/stone723cool/article/details/137626558

浙公网安备 33010602011771号