UNPIVOT
を使用できます 結果を取得する操作
SELECT col, value FROM (SELECT CAST(col1 AS VARCHAR) AS col1, CAST(col2 AS VARCHAR) AS col2, CAST(col3 AS VARCHAR) AS col3, CAST(col4 AS VARCHAR) AS col4 FROM Table1) p UNPIVOT (value FOR col IN (col1, col2, col3, col4) ) AS unpvt;
プレ>