Contents Index Inner and outer joins Outer joins

ASA SQL User's Guide
  Joins: Retrieving Data from Several Tables
    Inner and outer joins

Inner joins


By default, joins are inner joins. This means that rows are included in the result set only if they satisfy the join condition.

Example 

For example, each row of the result set of the following query contains the information from one customer row and one sales_order row, satisfying the key join condition. If a particular customer has placed no orders, the condition is not satisfied and the result set does not contain the row corresponding to that customer.

SELECT fname, lname, order_date
FROM customer KEY INNER JOIN sales_order
ORDER BY order_date
fname lname order_date
Hardy Mums 1/2/00
Aram Najarian 1/3/00
Tommie Wooten 1/3/00
Alfredo Margolis 1/6/00
... ... ...

Because inner joins and key joins are the defaults, you obtain the same result using the following FROM clause.

FROM customer JOIN sales_order

Contents Index Inner and outer joins Outer joins