The next sections describe and illustrate the outer join keywords using specific examples. All illustrations are based on the following three tables:
|
TABLEA |
|
TABLEB |
|
TABLEC |
|
|---|---|---|---|---|---|
|
A# |
ACITY |
B# |
BCITY |
C# |
CCITY |
|
A1 |
London |
B1 |
London |
C1 |
London |
|
A2 |
Paris |
B2 |
Oslo |
C2 |
Rome |
|
A3 |
? |
B3 |
? |
C3 |
? |
|
A4 |
NY |
B4 |
NY |
C4 |
Madrid |
|
A5 |
Madrid |
B5 |
LA |
C5 |
LA |
The tables are related by the CITY fields. Null valued (empty) fields are indicated by a question mark (?).
When the RELATED BY clause is used to join output rows, only joined rows are produced. This is called an inner equijoin. For more information, see Relationship Clauses.
The following query produces an inner equijoin of the tables ACITY and BCITY:
FIND ALL TABLEA RELATED BY ACITY VIA BCITY TO TABLEB
This is what the inner equijoin looks like:
|
A# |
ACITY |
B# |
BCITY |
|---|---|---|---|
|
A1 |
London |
B1 |
London |
|
A4 |
NY |
B4 |
NY |
|
Copyright © 2014 CA.
All rights reserved.
|
|