Database Reference
In-Depth Information
Figure 10.25
A Mutable Join of
Four Tables.
Looking at Figure 10.25, it is obvious that some kind of formatting
eliminating all the repetition of the CD title and artist name would be
desirable.
The next three examples shown as follows are different versions of the
ANSI format for the join query of four tables in Figure 10.25. All of the
next three examples (except the first, which returns an error) give you the
same results as shown in Figure 10.25.
Note: The important thing to remember about ANSI mutable joins is that
tables are joined from left to right with join conditions able to reference col-
umns relating to the current join and those already executed from the left.
The converse applies to subqueries where conditions are passed down into
subqueries and not up to the calling query (see Chapter 12).
First Example . Attempt to join four tables without specifying any
details of how the join is to be done.
SELECT M.TITLE CD, C.TRACK_SEQ_NO, S.TITLE, A.NAME
Search WWH ::




Custom Search