SQL Join Types

Learn about join operations and join types in SQL.

Joins are the basic operations we do with relations. The nature of a join operation is to build a new relation from a pair of existing ones.

The cross join

The most basic join is a cross join or Cartesian product, as we saw in the Boolean truth table, where we built a result set of all possible combinations of all entries.

The equality join

Other kinds of joins associate data between the two relations that participate in the operation. The association is specified precisely in the join condition and is usually based on some equality operator, but it’s not limited to that.

The non-equality join

We might want to count how many drivers made it to the finish behind the current one in any single race, as that’s a good illustration of a non-equality join condition:

Get hands-on with 1200+ tech skills courses.