DECLARE @MyCounter INT SET @MyCounter = 0 /*设置变量*/ WHILE (@MyCounter < 1000000) /*设置循环次数*/ BEGIN --WAITFOR DELAY '000:00:01' /*延迟时间10秒*/ insert Test(TestValue) values(GETDATE()) SET @MyCounter = @MyCounter + 1 END