從表A假設,我有EID的(2,3,4)在我的帳戶,在表B我想告訴所有記錄其中DEP等於EID。顯示記錄,其中列等於
謝謝
表A
++++++++++++++++++++++++++
id | EID | EC |
++++++++++++++++++++++++++
1 | 2 | M +
2 | 2 | Y +
3 | 3 | S +
4 | 3 | Q +
5 | 4 | L +
6 | 5 | I +
++++++++++++++++++++++++++
表B
++++++++++++++++++++++++++
A | B | DEP |
++++++++++++++++++++++++++
1 | 2 | 2 +
2 | 2 | 2 +
3 | 3 | 3 +
4 | 3 | 3 +
5 | 4 | 4 +
6 | 5 | 5 +
++++++++++++++++++++++++++
這是我想達到的輸出。
++++++++++++++++++++++++++
Results |
++++++++++++++++++++++++++
1 | 2 | 2 +
2 | 2 | 2 +
3 | 3 | 3 +
4 | 3 | 3 +
5 | 4 | 4 +
++++++++++++++++++++++++++
在查詢中的表和列是不一樣的表,您列出的列。 – Barmar
我刪除查詢,因爲我認爲它沒用。謝謝:) – Jason
你應該把它換成你實際嘗試過的。 – Barmar