declare @i tinyint,@sum int
set @sum=0
set @i=0
while @i>=0
begin
if(@i>=100)
begin
select'总和'=@sum
break
end
else
begin
set @i=@i+1
if(@i%2)=0
continue
else
set @sum=@sum+@i
end
end
declare @i smallint
set @i=100
select (1+case when @i/2*2=@i then @i-1 else @i end)*@i/4