表:Test
纵表转横表:
纵表效果图:
1 select * from TestView Code
实现的效果图:
1 select Name2 ,sum(case Course when '语文' then Score else 0 end) as 语文3 ,sum(case Course when '数学' then Score else 0 end) as 数学4 ,sum(case Course when '英语' then Score else 0 end) as 英语 5 from Test group by Name6 goView Code
横表转纵表:
新闻热点
疑难解答