私はmysql5.5を使用しており、以下の2つのテーブルがあります
+--------+---------------+---------------+
| CALLID | DL_THROUGHPUT | UL_THROUGHPUT |
+--------+---------------+---------------+
| 115 | 33.3333 | 43.3333 |
| 116 | 70 | 80 |
+--------+---------------+---------------+
+--------+----------------+----------------+
| CALLID | DL_DATA_VOLUME | UL_DATA_VOLUME |
+--------+----------------+----------------+
| 117 | 45 | 35 |
+--------+----------------+----------------+
完全に参加すると、私はこれを取得します:
+--------+---------------+---------------+--------+----------------+----------------+
| CALLID | DL_THROUGHPUT | UL_THROUGHPUT | CALLID | DL_DATA_VOLUME | UL_DATA_VOLUME |
+--------+---------------+---------------+--------+----------------+----------------+
| 115 | 33.3333 | 43.3333 | NULL | NULL | NULL |
| 116 | 70 | 80 | NULL | NULL | NULL |
| NULL | NULL | NULL | 117 | 45 | 35 |
+--------+---------------+---------------+--------+----------------+---------------+
そして私はこれが必要です:
+--------+---------------+--------------+-----------------+----------------+
| CALLID | DL_THROUGHPUT | UL_THROUGHPUT | DL_DATA_VOLUME | UL_DATA_VOLUME |
+--------+---------------+---------------+-----------------+----------------+
| 115 | 33.3333 | 43.3333 | NULL | NULL |
| 116 | 70 | 80 | NULL | NULL |
| 117 | NULL | NULL | 45 | 35 |
+--------+---------------+---------------+-----------------+---------------+
助言がありますか?
どうもありがとうゼーン、申し訳ありませんが、私がよく説明しない前に、私は次のようにケースを持っていることもできます:
+--------+---------------+---------------+
| CALLID | DL_THROUGHPUT | UL_THROUGHPUT |
+--------+---------------+---------------+
| 115 | 33.3333 | 43.3333 |
| 116 | 70 | 80 |
| 117 | 48 | 51 |
+--------+---------------+---------------+
+--------+----------------+----------------+
| CALLID | DL_DATA_VOLUME | UL_DATA_VOLUME |
+--------+----------------+----------------+
| 117 | 45 | 35 |
| 118 | 37 | 26 |
+--------+----------------+----------------+
そして私は必要になります:
+--------+---------------+--------------+-----------------+----------------+
| CALLID | DL_THROUGHPUT | UL_THROUGHPUT | DL_DATA_VOLUME | UL_DATA_VOLUME |
+--------+---------------+---------------+-----------------+----------------+
| 115 | 33.3333 | 43.3333 | NULL | NULL |
| 116 | 70 | 80 | NULL | NULL |
| 117 | 48 | 51 | 45 | 35 |
| 118 | NULL | NULL | 37 | 26 |
+--------+---------------+---------------+-----------------+---------------+