select nian,xm,decode(nian,if nian<20 ,'20岁以下') as nld from (
select zgh,xm,nian from t_jzg
)
用case when
select nian,xm,case when nian<20 then 20岁以下 end as nld from (
select zgh,xm,nian from t_jzg)
select nian,xm,case when nian<20 then 20岁以下 end as nld from (
select zgh,xm,nian from t_jzg)
温馨提示:答案为网友推荐,仅供参考