我有两个表,我想运行一个类似这样的查询,其中两列都可以为null:
SELECT tableA.id as tableA, tableB.id as tableB
LEFT JOIN tableA WHERE tableA.name LIKE 'blah%'
LEFT JOIN tableB WHERE tableB.name LIKE 'blah%'
我知道这些查询不正确,但我只想传达我想要的一般概念。我在找什么 for是能够返回以下结果集
+------------+----+
| tableA | tableB |
+------------+----+
| NULL | 1 |
+------------+----+
+------------+----+
| tableA | tableB |
+------------+----+
| NULL | NULL |
+------------+----+
+------------+----+
| tableA | tableB |
+------------+----+
| 1 | 1 |
+------------+----+