create procedure p5(inout n int )
begin
declare sum int default 0;
while n != 0 do
set sum := sum + n;
set n = n - 1;
end while;
set n = sum;
end;
set @n := 100 ;
call p5(@n);
select @n;
create procedure p6(in n int)
begin
declare result varchar(10) default 0;
repeat
set result := result + n;
set n = n - 1;
until n <= 0 end repeat;
select result;
end;call p6(100);