Right outer join

A right outer join returns all the rows that an inner join returns plus one row for each of the other rows in the second table that did not have a match in the first table. It is the same as a left outer join with the tables specified in the opposite order.

The query that was used as the left outer join example can be rewritten as a right outer join as follows:

  SELECT EMPNO, LASTNAME, PROJNO
    FROM CORPDATA.PROJECT RIGHT OUTER JOIN CORPDATA.EMPLOYEE
          ON EMPNO = RESPEMP
    WHERE LASTNAME > 'S'

The results of this query are identical to the results from the left outer join query.