declare @count_num int
set @count_num=1
while @count_num<31
begin
insert into test(age) select @count_num
set @count_num=@count_num+1
end
go
set @count_num=1
while @count_num<31
begin
insert into test(age) select @count_num
set @count_num=@count_num+1
end
go
Create table TEST(age Int)
GO
Declare @I Int
Set @I=1
While @I<31
Begin
Insert TEST Values(@I)
Set @I=@I+1
End
GO
Select * from TEST
GODrop table TEST
declare @I smallint
set @i=1
while @i<=30
begin
insert into Test(age)
select @i
set @i=@i+1
end