Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
以下の TSQL クエリ結果の転置された UNION を取得するにはどうすればよいですか
SELECT TOP 1 Column_A FROM table1 SELECT TOP 1 Column_B FROM table2 SELECT TOP 1 Column_C FROM table3
そのため、出力は、それぞれに 1 つの値を持つ 3 列の 1 行になります。
[Column_A] [Column_B] [Column_C]
このような:
Select (SELECT TOP 1 Column_A FROM table1) as 'Column_A', (SELECT TOP 1 Column_B FROM table2) as 'Column_B', (SELECT TOP 1 Column_C FROM table3) as 'Column_C'