用sql语句编写1加到50的

2025-04-14 09:36:59
推荐回答(1个)
回答1:

declare @I int=0,@S=0
while @I<=50
begin
set @I=@I+1
set @S=@S+@I
end
print @S