关于sql 的列转行

1 select * from TbaleOne
2 unpivot(qty for years in ([2002],[2003],[2004])) as up
3 go
4 
5 select * from TableTwo
6 unpivot(grate for subject in [kemu]) as up


具体看图

posted @ 2016-03-02 22:59  临冰听雪丶  阅读(154)  评论(0编辑  收藏  举报