Skip to content

Instantly share code, notes, and snippets.

Created April 9, 2015 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/0df43d52d774ad5edb7f to your computer and use it in GitHub Desktop.
Save anonymous/0df43d52d774ad5edb7f to your computer and use it in GitHub Desktop.
TSQL Loop
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