-- 查询符合条件的表 SELECT CONCAT('truncate table ', table_name, ';') FROM information_schema. TABLES WHERE table_schema = 'db-mayn-erp-test' AND TABLE_NAME LIKE '%purchase%' AND table_type = 'base table'; -- user 你的表名 truncate table users; -- 拷贝查询到的结果,然后运行 truncate table purchase_execute; truncate table purchase_execute_materials; truncate table purchase_order; truncate table purchase_order_materials;