case_when

case_when

select sname,score,
case
when score>=20 and score<30 then 20
when score>=30 and score<40 then 30
when score<=40 and score<50 then 40
else 50
end as score_new from teacher

 

case_when

 

上一篇:MySQL笔记2


下一篇:Oracle中connect by 的执行结果记载