Databases Reference
In-Depth Information
Figure 5-6. The Access Select Query design window showing a join between two
properties
4. Now run the query. You should get a table as shown in Figure 5-7. This table
contains the ten rows from Diff1, with an extra column that gives the matching
ISBN from Diff2, if there is one. Otherwise, the column contains a NULL. We
can see that the six rows that have a matching ISBN in column Diff2.ISBN form
the intersection of the two tables. Also, the four rows that do not have a matching
ISBN form the difference Diff1 - Diff2. Hence, we only need to add a simple
criterion to the query to obtain either the intersection or the difference.
Figure 5-7. The Access Select Query window showing the intersection of two
tables
5. To get the intersection Diff1 Diff2, return to the design view of the query, and
add the words Is Not Null under the Criteria row in the Diff2.ISBN column. Run
the query.
6. To get the difference Diff1 - Diff2, return to the design view of the query, and add
the words Is Null under the Criteria row in the Diff2.ISBN column. Run the
query.
Search WWH ::




Custom Search