第1个回答 2014-12-31
--1
declare @a int,@b int,@sum int
set @sum=0
set @a=10
set @b=100
while @a<=@b
begin
set @sum=@sum+@a
set @a=@a+1
end
print @sum
go
--2
declare @a int,@b int
set @a=10
set @b=100
if @a>@b print 'a大于b'
else if @a=@b print 'a等于b'
else print 'a小于b'本回答被提问者采纳