create student
returns begin
begin
decalre sum begin;
declare I int ;
set sum = 0
set I =1
while I <= N do
set sum = sum+I
set I=I+1
end while ;
return sum;
end;
注意:加法从0开始,乘从1开始。
create student
returns begin
begin
decalre sum begin;
declare I int ;
set sum = 0
set I =1
while I <= N do
set sum = sum+I
set I=I+1
end while ;
return sum;
end;
注意:加法从0开始,乘从1开始。