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


具体看图

你可能感兴趣的:(关于sql 的列转行)