📅  最后修改于: 2022-03-11 15:05:10.711000             🧑  作者: Mango
/* while loop SQL Server */
DECLARE @Counter INT
SET @Counter = 1
WHILE (@Counter <= 10)
BEGIN
PRINT 'The counter value is = ' + CONVERT(VARCHAR, @Counter)
SET @Counter = @Counter + 1
END