![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
1 declare @N int=0 2 while @N<=100 3 begin 4 print @N; 5 begin 6 if @N%2=0 7 print getdate(); 8 else 9 select GETDATE(); 10 end 11 set @N=@N+1 12 end
1 declare @N int=0 2 while @N<=100 3 begin 4 print @N; 5 begin 6 if @N%2=0 7 print getdate(); 8 else 9 select GETDATE(); 10 end 11 set @N=@N+1 12 end
转载于:https://www.cnblogs.com/heroysj/p/10869012.html