I'm not sure how to describe my table structure, so hope this makes sense ...
I have 3 tables in a hierarchical relationship, so A has a one-to-many relationship with B, which in turn has a one-to-many relationship with C. The trick is that the foreign key in B and C is allowed as null (i.e. not defined by the parent). I also have D and E with no relation to A, B or C (directly).
Finally, I have F, which is a multi-to-one join table with C, D, and E. None of its fields (FKs for other tables) allow values.
I would like to write an SQL statement that joins all tables in one result set. I know that I have external external connections of the user, because I want all A to return regardless of whether he has children in B and similar to B and C.
Question 1: I looked at the syntax of the ANSI outer join (I used to use Oracle "(+)") and cannot find an example that outer joins more than two tables. Can someone point / point an example?
Question two: Is it possible to include entries from tables D and E based on join table F? If so, is this done with external connections?
Thank!
EDIT
Of course, right after I posted this, I found an example that answers question 1. However, question 2 still puzzles me.
Example:
SELECT A.a,
B.b,
C.c
FROM A
FULL OUTER JOIN B ON B.a = A.a
FULL OUTER JOIN C ON C.b = B.b