SQL行转列

 1 select * from Score 

1 select student,
2 sum(case course when '语文' then score end) as '语文',
3 sum(case course when '数学' then score end) as '数学',
4 sum(case course when '英语' then score end) as '英语'
5 from Score 
6 group by student

 

posted @ 2018-08-02 16:26  徒然喜欢你  阅读(374)  评论(1编辑  收藏  举报