loop in sql

علی ذوالفقار
1400/04/30 10:06:42 (590)
DECLARE @Counter INT 
SET @Counter=1
WHILE ( @Counter <= 100)
BEGIN
    PRINT 'The counter value is = ' + CONVERT(VARCHAR,@Counter)
		SET @Counter  = @Counter  + 1
END
Back