About Join Operations

The JOIN operations, which are among the possible FROM clause, perform joins between two tables.

Syntax

JOIN Operation

The following table describes the JOIN operations:

Join Operation Description
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.
CROSS JOIN Specifies a join that produces the Cartesian product of two tables. It has no explicit join clause.
NATURAL JOIN

Specifies an inner or outer join between two tables. It has no explicit join clause. Instead, one is created implicitly using the common columns from the two tables.

Splice Machine does not currently support NATURAL SELF JOIN operations.

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.

Usage

Note that you can also perform a join between two tables using an explicit equality test in a  WHERE clause, such as:

WHERE t1.col1 = t2.col2.

See Also