标签: sql
如何在使用单选查询选择时,在表格中分别用“男性”和“女性”替换值1和2?
Name Gender a 1 a 2
答案 0 :(得分:6)
select Name , case Gender when 1 then 'Male' when 2 then 'Female' end as Gender from YourTable