SQLServer(二) Case When

crowds 2019-12-02

案例一

select 
id,
case id 
when ‘6‘ then ‘six‘
when ‘7‘ then ‘seven‘
when ‘8‘ then ‘eight‘
else ‘other‘
end as id_type
from formtable_main_122 where id = 7

相关推荐

maokaijiang / 0评论 2019-10-30