关于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


具体看图

原文地址:https://www.cnblogs.com/myblogslh/p/5236880.html