ON clause

The part of a join that states which rows of the two tables belong together.

In more detail

It usually compares a foreign key with the primary key it points at. A condition in ON that names only one table is a filter, not a pairing rule, and silently pairs every row with every matching row. In an outer join, conditions on the optional table belong in ON, not WHERE.

Related terms

Taught in

References