select id, decode (type,1,a,2,b,3,c,999) from xxx;
select name, (case when score<0 then 'd'
when score <60 then 'd'
when score<=60 then 'c'
else 'b' end )from xxx;
select id, decode (type,1,a,2,b,3,c,999) from xxx;
select name, (case when score<0 then 'd'
when score <60 then 'd'
when score<=60 then 'c'
else 'b' end )from xxx;
转载于:https://www.cnblogs.com/abcyrf/p/7811878.html