SQL中编程,求和:S=1+(1+2)+(1+2+3)+``````+(1+2+3+`````+100)怎样做?

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/22 00:17:17
SQL中编程,求和:S=1+(1+2)+(1+2+3)+``````+(1+2+3+`````+100)怎样做?SQL中编程,求和:S=1+(1+2)+(1+2+3)+``````+(1+2+3+``

SQL中编程,求和:S=1+(1+2)+(1+2+3)+``````+(1+2+3+`````+100)怎样做?
SQL中编程,求和:S=1+(1+2)+(1+2+3)+``````+(1+2+3+`````+100)怎样做?

SQL中编程,求和:S=1+(1+2)+(1+2+3)+``````+(1+2+3+`````+100)怎样做?
DECLARE @s bigint ,@i int ,@j int ,@k int
set @s=1
set @i=2
while @i