drop proc alls
go
create proc alls
as
begin
declare @in int
declare @sql varchar(500)
set @in=0
while @in<100
begin
set @sql='insert into jiameng(comname,comadd,comtel,jiamengcontent) values('''+cast(@in as varchar(50))+''',''ss'',''qq'',''zz'')'
--set @sql='insert into jiameng(comname,comadd,comtel,jiamengcontent) values('''+cast(@in as varchar(50))+''','ss','qq','zz')'
exec(@sql)
set @in=@in+1
end
end
go