【发布时间】:2014-10-23 04:42:14
【问题描述】:
如果满足某个条件,如何更改列的输出值及其列名? 假设我有表 A,它有 3 列 身份证、称呼、姓名、姓氏、性别
我可以选择所有这些
select * from A
如果我想根据数据行的性别输出称呼的值怎么办? 在select语句中怎么做,伪代码是这样的
select everything, if the gender is Male, then set salutation to Mr. else, set salutation to Ms. but then change the salutation into alias namePrefix
如何在 oracle 的纯 select 语句中做到这一点?
【问题讨论】: