求助笛卡尔积的问题
mysql> select * from tba;+------+------+
| id | name |
+------+------+
| 18 | na |
+------+------+
1 row in set (0.00 sec)
mysql> select * from tbb;
+------+------+
| id | a_id|
+------+------+
| 10 | 18 |
| 13 | 18 |
+------+------+
2 rows in set (0.00 sec)
mysql> select * from tbc;
+------+------+
| id | a_id
+------+------+
| 101 | 18 |
| 120 | 18 |
| 130 | 18 |
+------+------+
3 rows in set (0.00 sec)
怎么不让他笛卡尔积分
想要这样的数据
+------+------+------+
| c | b | a_id |
+------+------+------+
| 101 | NULL | 18 |
| 120 | NULL | 18 |
| 130 | NULL | 18 |
| NULL | 10 | 18 |
| NULL | 13 | 18 |
+------+------+------+
先谢谢各位