sql 利用 case when then 多条件判断
1.
select xuehao,name1,dengji= case when zongfenshu <50 then '不及格' when zongfenshu >=50 and zongfenshu <=60 then '合格' else '优秀' end from aaa where zhuanyeming='计算机'
update aaa set zongfenshu = case when dengji ='及格' then zongfenshu+5 when dengji='优秀' then zongfenshu+20 else zongfenshu*2 end