Right outer join
The RIGHT OUTER JOIN clause lists rows from the right table even if there are no matching rows on left table.
As in an inner join, the join condition of a right outer join can be any simple or compound search condition that does not contain a subquery reference.
ExampleTo include rows from the PRODUCTS table that have no matching values in the PARTS table and to include only prices that exceed $10.00, run this query:
SELECT PART, SUPPLIER, PRODUCTS.PROD#, PRODUCT, PRICE FROM PARTS RIGHT OUTER JOIN PRODUCTS ON PARTS.PROD# = PRODUCTS.PROD# WHERE PRODUCTS.PRICE>10.00;
The result table looks like the following example:
PART SUPPLIER PROD# PRODUCT PRICE ======= ============ ===== ========== ===== MAGNETS BATEMAN 10 GENERATOR 45.75 WIRE ACWF 10 GENERATOR 45.75 BLADES ACE_STEEL 205 SAW 18.90
Because the PRODUCTS table cannot have rows that are not matched by values in the joined columns and because the PRICE column is in the PRODUCTS table, rows in which the PRICE value does not exceed $10.00 are not included in the result of the join.