在SQL查询分析器里写了一个存储过程
CREATE procedure dbo.TestFlux8
@i int
as
BEGIN
IF @i<100
insert into yonghu(yh_id,yh_name,yh_password) values('5','5','5')
set @i = @i+1
END;
已经成功运行呀。可执行的时候去老通不过。。Exec TestFlux8(0);
CREATE procedure dbo.TestFlux8
@i int
as
BEGIN
IF @i<100
insert into yonghu(yh_id,yh_name,yh_password) values('5','5','5')
set @i = @i+1
END;
已经成功运行呀。可执行的时候去老通不过。。Exec TestFlux8(0);
@i int
as
BEGIN
IF @i<100
begin
insert into yonghu(yh_id,yh_name,yh_password) values('5','5','5')
set @i = @i+1
end
END
@i int
as
BEGIN
while @i<100
begin
insert into yonghu(yh_id,yh_name,yh_password) values('5','5','5')
set @i = @i+1
end
END
if 只能执行一次,这样就可以了!