You can use the sp_MSforeachtable stored procedure like so:
USE MyDatabase
EXEC sp_MSforeachtable 'TRUNCATE TABLE ?'
Or you can create SQL Statement
SELECT concat('TRUNCATE TABLE ', TABLE_NAME, ';')
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME LIKE 'TableName%'
and run this above SQL statement
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…