declare
@sql varchar(500),
@count int;--循环次数
begin
set @count=318
while @count<350
begin
set @sql = 'insert into t_rooms (id,name,type)values('+cast(@count AS varchar(10))+',''1'',1)'
print @sql
--execute(@sql);
set @count=@count+1;
end;
end;