a.
select
(case score when 0 then '无成绩' else '有成绩' end) as score
from table
select
(case score when 0 then '无成绩' when 60 then '好成绩' else '有成绩' end) as score
from table
b.
select
decode(score,0,'无成绩',20,'低成绩',60,'过得去','好成绩') as score
from table
-- 最后的好成绩是默认
select
(case score when 0 then '无成绩' else '有成绩' end) as score
from table
select
(case score when 0 then '无成绩' when 60 then '好成绩' else '有成绩' end) as score
from table
b.
select
decode(score,0,'无成绩',20,'低成绩',60,'过得去','好成绩') as score
from table
-- 最后的好成绩是默认