要求;
create procedure chengji(inout i int)
begin
declare n int;
declare result varchar(20);
set n=i;
case
when n>=90 then
set result='A';
when n>=80 then
set result='B';
when n>=70 then
set result='C';
when n>=60 then
set result='D';
else
set result='E';
end case;
select n,result ;
end;
set @x=40;
call chengji(@x);
select @x;