Specifying Join Conditions

The examples so far have illustrated joins based on equality or on matching values in the joining columns. Joins based on equality are indicated with the “=” logical operator in the join column clause (WHERE or ON). Joins can also be constructed on other conditions: The join operator can be any one of the comparison operators or a special operator for specifying an outer join (which we'll discuss later).

In addition to the equality operator, the other comparison operators that can be used to specify comparison conditions are shown in Figure 7.3.

Figure 7.3. Comparison Operators

Get Practical SQL Handbook, The: Using SQL Variants, Fourth Edition 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.