在用MySQL(版本是8.0以上的) case分支语句出现报错,只要是用case就会,简单的分支语句也是如此,大家帮忙看下,如下图
这是其中一个存储过程脚本
create procedure proc_test9(in score int)
begin
case
when score > 90 and score <= 100 then select 'a';
when score > 80 then select 'b';
when score > 70 then select 'c';
else select 'd';
end case;
end;