批量执行sql语句的方法

复制代码 代码如下:

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

原创文章,作者:3628473679,如若转载,请注明出处:https://blog.ytso.com/233515.html

(0)
上一篇 2022年1月23日
下一篇 2022年1月23日

相关推荐

发表回复

登录后才能评论