第一步:查询出所有要 truncate 的脚本

select CONCAT('truncate TABLE ',TABLE_NAME, ';') from
 INFORMATION_SCHEMA.TABLES where  table_schema in ('plan-template');

-- plan-template 是数据库名

 

第二步:把查询结果复制粘贴执行

mysql  truncate 数据库所有表

 

相关文章:

  • 2021-12-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-07
猜你喜欢
  • 2022-12-23
  • 2021-08-11
  • 2022-12-23
  • 2021-11-30
  • 2021-08-18
  • 2021-11-30
相关资源
相似解决方案