Using Inner Joins

A Brief Overview

An SQL inner join combines matching rows between two tables. You can perform an inner join on tables using two methods:
  • Specify the two tables to be joined in a FROM clause separated by the INNER JOIN keyword. Next, specify an ON clause that indicates how rows should be matched.
  • Join the two tables based on the matching criteria, known as join conditions, that you specify in a WHERE clause.
The following diagram illustrates an inner join of two tables. The shaded area of overlap represents the matching rows (the subset of rows) that the inner join returns as output.
Figure 3.2 Venn Diagram, Inner Join for Table 1 and Table 2
Note: An inner join is sometimes called a conventional join

Get SAS Certified Professional Prep Guide 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.