答案 0 :(得分:0)
您可以在以下情况下使用大小写
select memberId,FullName,
max(case when acc_head='Health Saving' then balance end) as health_saving,
max(case when acc_head='Health Saving' then MonthlyAmt end) as MonthAmt_Hel_saving,
max(case when acc_head='Education Saving' then balance end) as Education_saving,
max(case when acc_head='Education Saving' then MonthlyAmt end) as MonthAmt_Ed_saving
from table
group by memberId,FullName