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.
我有一张名为PEOPLE的表,它显示
姓名 性别 ++++ ++++++ 汤姆 1 简 2
在性别栏中,数字等于性别 1=男性 2=女性
我想
从人员中选择姓名、性别(将 1 或 2 替换为男性或女性)
结果显示
汤姆 男 简 女
我不希望更改数据库中的数据,只是更改从选择中呈现数据的方式。
任何帮助,将不胜感激。
问候
Select Name, case Sex when 1 then 'Male' else 'Female' end from people