SqlServer循环语句
declare @i int
set @i =1
while(@i<5)
begin
set @i = @i+1
insert into text(id,name) values(‘1‘,‘王麻子‘)
end
SqlServer批量倒数据
如果两张表字段相同的话:
insert into text1 select * from text
如果两张表字段不同的话:
insert into text1(fid,fname,fage...) select fid,fname,fage... from text
注:text1是目标表 text是源表