Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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