SQL Convert column to row

后端 未结 4 644
执笔经年
执笔经年 2020-12-12 01:39

My table has the following columns:

A  |  B  |  C  |  D  |  E  |  F  

I want to displays this as follow:

MyColumn  |  MyCol         


        
4条回答
  •  死守一世寂寞
    2020-12-12 02:33

    In Sql Server 2005 Unpivot operator can solve your problem. Unpivot converts columns to rows in sql server 2005.

    Hope it helps

提交回复
热议问题