with cte as ( select 'A' as tag , as num_1 , as num_2 , as num_3 , as num_4 ,null as num_5 union select 'B' as tag , as num_1 , as num_2 ,null as num_3 , as num_4 , as num_5 ) select tag,item,val from ( select * from cte ) as pivotinput unpivot ( val…
1.旋转 ;WITH CTE AS ( AS VAL UNION ALL UNION ALL UNION ALL UNION ALL UNION ALL UNION ALL UNION ALL ) SELECT TAG,NUM_1 AS NUM_1,NUM_2 AS NUM_2,NUM_3 AS NUM_3,NUM_4 AS NUM_4,NUM_5 AS NUM_5 FROM CTE PIVOT( MAX(VAL) FOR ITEM IN (NUM_1,NUM_2,NUM_3,NUM_4,NUM…