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

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/08 02:43:09
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