Created
April 9, 2015 10:45
-
-
Save anonymous/0df43d52d774ad5edb7f to your computer and use it in GitHub Desktop.
TSQL Loop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @thisThing INT | |
DECLARE @thatThing INT | |
SET @thisThing = 1 | |
SET @thatThing = 10 | |
WHILE @thisThing < @thatThing | |
BEGIN | |
--Do stuff | |
SELECT GETDATE() | |
SET @thisThing = @thisThing + 1 | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment