Truncate multiple tables in one MySQL statement
问题 Is there a possibility to truncate with one SQL statement, multiple tables? Like this: truncate table #OBJ_AvailabilityTraining, #OBJ_AvailabilityHoliday, #Dates_temp; Regards 回答1: No, you can only truncate a single table with TRUNCATE command. To truncate multiple tables you can use T-SQL and iterate through table names to truncate each at a time. DECLARE @delimiter CHAR(1), @tableList VARCHAR(MAX), @tableName VARCHAR(20), @currLen INT SET @delimiter = ',' SET @tableList = 'table1,table2