JOIN Operations

Perform joins between two tables.

Syntax

Table-name [ INNER JOIN, [ LEFT OUTER JOIN, RIGHT ] OUTER ] JOIN table-name ON boolean-expression

Description

The JOIN operations, which are among the possible TableExpression in a FROM, perform joins between two tables. (A join can also be performed between two tables using an explicit equality test in a WHERE, such as "WHERE t1.col1 = t2.col2".)

The JOIN operators are:
  • INNER JOIN: Specifies a join between two tables with an explicit join clause.
  • LEFT OUTER JOIN: Specifies a join between two tables with an explicit join clause, preserving unmatched rows from the first table.
  • RIGHT OUTER JOIN: Specifies a join between two tables with an explicit join clause, preserving unmatched rows from the second table.

In all cases, you can specify additional restrictions on one or both of the tables being joined in outer join clauses or in the WHERE clause.