Chapter 5. Using Multiple Tables

So far, we have been dealing with only one table at a time in our SQL query examples. But typically the information needed to satisfy a user query requires more than one table. For example, the EMPLOYEES table has a column with a department number but not a department name; the department name must be retrieved from the DEPARTMENTS table. You can get this information by joining the two tables on a common column, in this case, the DEPARTMENT_ID column. Two or more tables can also be joined in situations where the columns may not be equal.

The boss at Scott's widget company has realized that data can be pulled from more than one table at a time. Now the application developer and DBA, Janice, has been busy trying ...

Get Oracle Database Foundations 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.