The question is the following I want to insert in a field of a table a range of numbers that goes from 100 to 1 000 000 000 and did not want to be doing 1 to 1. How can I do this automatically?
In SQL Server
The question is the following I want to insert in a field of a table a range of numbers that goes from 100 to 1 000 000 000 and did not want to be doing 1 to 1. How can I do this automatically?
In SQL Server
I already found a response is as follows:
DECLARE @num INT = 100
WHILE(@num<200)
begin
INSERT INTO [dbo].[tableName]([row1],[row2],[row3],[row4])
VALUES (@num,value2,value3,value4)
SET @num = @num + 1
end