declare @i int,@j int select @i = 0,@j = 0 while @i < 3 begin while @j < 3 begin select @i as i,@j as j set @j = @j + 1 end set @i = @i + 1 end
我错过了一些明显的事吗?
set @i = @i + 1 set @j = 0