Adding SQL data using a for loop

By Tom / July, 23, 2009 / 0 comments

Simple but need to remember this…

declare @counter int
	set @counter = 0
	while @counter < 255
	begin
	  set @counter = @counter + 1
	  INSERT into probel (input , output) VALUES ( @counter , @counter )
	end