http://www.cnblogs.com/luofuxian/archive/2012/02/23/2364328.html
http://www.alonely.com.cn/MsSql/20160929/47082.html
create table table_name( row1 varchar(20), row2 varchar(20), row3 varchar(20), column1 varchar(20), column2 varchar(20), column3 varchar(20) ) insert into table_name(row1,row2,row3,column1,column2,column3) values('row1','row2','row3','column1','column2','column3');
SELECT row1,row2,row3,tType=attribute FROM (select * from table_name)a UNPIVOT ( value FOR attribute IN(column1,column2,column3) ) AS UPV