# JOIN operations

The JOIN operations, which are among the possible TableExpressions in a FROM clause, perform joins between two tables. (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".)

#### Syntax

    JOIN Operation

The JOIN operations are:

- INNER JOIN operation

  Specifies a join between two tables with an explicit join clause. See INNER JOIN operation.

- LEFT OUTER JOIN operation

  Specifies a join between two tables with an explicit join clause, preserving unmatched rows from the first table. See LEFT OUTER JOIN operation.

- RIGHT OUTER JOIN operation

  Specifies a join between two tables with an explicit join clause, preserving unmatched rows from the second table. See RIGHT OUTER JOIN operation.

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.

#### JOIN expressions and query optimization

For information on which types of joins are optimized, see Tuning Derby.

- INNER JOIN operation
- LEFT OUTER JOIN operation
- RIGHT OUTER JOIN operation

Parent topic: SQL language reference
Related concepts
SQL identifiers
Statements
Built-in system functions
Built-in system procedures
Data types
Related reference
Capitalization and special characters
SQL clauses
SQL expressions
SQL queries
Built-in functions
SYSCS_DIAG diagnostic tables and functions