A join operation pairs rows of one table with rows of another table. "Table", as used in this definition, may be a table, a view, or a nested table.
A join condition specifies conditions under which rows of one table (say T1) are to be paired with rows of another table (say T2). If the join condition is true, rows are paired.
DB2 V4.1 supports four kinds of join operations:
| INNER JOIN | The result consists of rows from T1 paired with rows from T2. |
| LEFT OUTER JOIN | The result consists of rows from T1 paired with rows from T2 and, for each unpaired row of T1, the concatenation of that row with the null row of T2. All columns derived from T2 allow null values, regardless of whether the T2 column definitions allow nulls or not. |
| RIGHT OUTER JOIN | The result consists of rows from T1 paired with rows from T2 and, for each unpaired row of T2, the concatenation of that row with the null row of T1. All columns derived from T1 allow null values, regardless of whether the T1 column definitions allow nulls or not. Note that T1 RIGHT OUTER JOIN T2 produces the same result as T2 LEFT OUTER JOIN T1; thus, RIGHT OUTER JOIN is a redundant feature. |
| FULL OUTER JOIN | The result consists of rows from T1 paired with rows from T2 and, for each unpaired row of T1, the concatenation of that row with the null row of T2, and, for each unpaired row of T2, the concatenation of that row with the null row of T1. All columns of the result allow null values, whether the T1 and T2 column definitions allow null values or not. |
©Copyright 1996 Chuck Anesi all rights reserved