create table ta (id int)
go
declare @i int, @j int
select @ i = 1, @ j = 100
while @i!> @ j
begin
insert ta select @i
set @ i = @ i + 1
end
select * from ta
create table ta (id int)
go
declare @i int, @j int
select @ i = 1, @ j = 1000000--define one million
while @i!> @ j
begin
insert ta select @i
set @ i = @ i + 1
end
select * from ta