-2
假設我有多個查詢:將多個結果到1
SELECT col1, col2 FROM tab1;
SELECT colA, colB FROM tab2;
SELECT colTest, colBlah FROM tab3;
每個查詢將返回唯一1條結果。
如何將這3個結果合併爲1?
結果將看起來像:
+------+------+------+------+---------+---------+
| col1 | col2 | colA | colB | colTest | colBlah |
+------+------+------+------+---------+---------+
| abc | def | Ghi | JkL | 12A | 42BD |
+------+------+------+------+---------+---------+
@ user1170330 - (我知道你說的語句只返回一個記錄,但... )確保您瞭解[如何交叉連接工作](https://en.wikipedia.org/wiki/Join_(SQL)#Cross_join),當有*多於一條記錄時。 – Leigh