思路:先将查询结果用union放在一起,然后做左连接查询
select a.id ,b.id ,c.id from (
select id from test_A a UNION select * from test_B b UNION select * from test_C c
) abc
LEFT JOIN test_A a
on abc.id = a.id
LEFT JOIN test_B b
on abc.id = b.id
LEFT JOIN test_C c
on abc.id = c.id