In the example you posted, what is the output that you are expecting? You can change the joins to FULL JOIN and see if that meets your requirements:SELECT * FROM
A FULL JOIN B on A.id1 = b.id1
FULL JOIN C ON B.id1 = C.id1
If that is not it, please post sample input data long with the required output.