FOR Loop

The FOR loop iterates over a defined variable by incrementing the value with the specified increment.

FOR @variable=start_value TO end_value+increment_value
PRINT ‘The value of @variable is now:’+@variable
NEXT
DECLARE @i as int

FOR @i=1 TO 10+1
PRINT 'Value of variable '' + @i
NEXT
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.