hn_lijia

导航

行转列语句,记录一下

select * from
(select UserName,Subject,Source from TestTable) testpivot(sum(Source) for Subject in(语文,数学,英语)
) pvt

posted on 2019-11-08 23:18  hn_lijia  阅读(98)  评论(0编辑  收藏  举报