在SQL Server 中完成计算1-100之内所有的偶数之和
begin declare @sum int,@i int set @sum=0 set @i=2 while(@i<=100) begin set @sum=@sum+@i set @i=@i+2 end print "the sum is:"+cast(@sum as char) end