Skip to content

Instantly share code, notes, and snippets.

@MikeLarned
Created February 13, 2012 18:50
Show Gist options
  • Save MikeLarned/1819026 to your computer and use it in GitHub Desktop.
Save MikeLarned/1819026 to your computer and use it in GitHub Desktop.
SQL While with Counter
begin tran
declare @count int
set @count = 0
while (@count < 40)
begin
insert into dbo.Inventory VALUES ('' + CONVERT(varchar, @count) , 1000)
set @count = (@count + 1)
end
rollback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment