Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用单选查询进行选择时,如何将表中的值 1 和 2 分别替换为“男性”和“女性”?
Name Gender a 1 a 2
select Name , case Gender when 1 then 'Male' when 2 then 'Female' end as Gender from YourTable