sql中把查询结果从竖列转为横向

2025-03-11 03:53:28
推荐回答(1个)
回答1:

select a as A,max(case when b='a' then c end) as a,max(case when b='b' then c end) as b,max(case when b='c' then c end) as c,max(case when b='d' then c end) as d from a