Combine Multiple Tables: Use the Join Statement

Much of the time, you will want to extract data from multiple tables. For example, you might get a request to create a list of business clients and their associated contacts. This is the basic framework that will be used to introduce the concepts of joining tables. There are four types of joins: inner, left outer, right outer, and full outer. Figure 8.17 provides a graphical illustration of how the various types of joins work together in relation to the tables that are joined. Throughout this discussion, you will continually be referred to Figure 8.17. To illustrate how the different join techniques work, the Client and Contact tables will be used.

Figure 8.17. There are four ways two tables ...

Get Absolute Beginner’s Guide to Databases now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.