代码如下:
DECLARE @MyCounter INT
SET @MyCounter = 0 /*设置变量*/
WHILE (@MyCounter < 2) /*设置循环次数*/
BEGIN
WAITFOR DELAY '000:00:1' /*延迟时间1秒*/
INSERT INTO comments (username)
values('ahuinan')
SET @MyCounter = @MyCounter + 1
END
代码如下:
DECLARE @MyCounter INT
SET @MyCounter = 0 /*设置变量*/
WHILE (@MyCounter < 2) /*设置循环次数*/
BEGIN
WAITFOR DELAY '000:00:1' /*延迟时间1秒*/
INSERT INTO comments (username)
values('ahuinan')
SET @MyCounter = @MyCounter + 1
END