Mysql清空某个数据库下的所有表的数据
2019-06-18 本文已影响0人
cuihaomaster
使用navicat 软件
1.db_game 为要清空的数据库
select CONCAT('truncate TABLE ',table_schema,'.',TABLE_NAME, ';')
from INFORMATION_SCHEMA.TABLES where table_schema in ('db_game');
执行结果:

-
选中复制步骤一的执行结果,再打开个新的查询窗口,粘贴执行。
image.png