CREATE TABLE t1 (id int); CREATE TABLE t2 (id int); INSERT INTO t1 VALUES (1), (2), (2); INSERT INTO t2 VALUES (2), (3); SELECT t1.id, t2.id FROM t1 LEFT JOIN t2 USING (id) UNION ALL SELECT t1.id, t2.id FROM t1 RIGHT JOIN t2 USING (id); /* +------+------+ | id | id | +------+------+ | 1 | NULL | | 2 | 2 | | 2 | 2 | | 2 | 2 | | 2 | 2 | | NULL | 3 | +------+------+ 6 rows in set (0.00 sec) Too many. */ SELECT t1.id, t2.id FROM t1 LEFT JOIN t2 USING (id) UNION SELECT t1.id, t2.id FROM t1 RIGHT JOIN t2 USING (id); /* +------+------+ | id | id | +------+------+ | 1 | NULL | | 2 | 2 | | NULL | 3 | +------+------+ 3 rows in set (0.00 sec) Too few. */ select * from t1 left outer join t2 on (t1.id=t2.id) union all select * from t1 right outer join t2 on (t1.id=t2.id) where t1.id is null; /* +------+------+ | id | id | +------+------+ | 1 | NULL | | 2 | 2 | | 2 | 2 | | NULL | 3 | +------+------+ 4 rows in set (0.00 sec) */