Right outer joins
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
Right outer joins
In a right outer join, the information from the table
on the right is preserved. The result table contains all rows from
the right table even if some rows do not have matching rows in the
left table. Where there are no matching rows in the left table,
SQL generates NULL values.
The following example offers an example of a right outer join.
|
This query produces the following results:
|
When working with right outer joins, remember the following:
- The outer join operator
(+)appears on the left side of a right outer join. - As you become fluent in SQL, you will notice that you can achieve
the result of a right outer join by writing a left outer join and
reversing the tables in the
FROMandONclauses. So, why do we have right outer joins? The reason is that right outer joins are a SQL standard with which OpenEdge SQL simply complies.
The following example uses the RIGHT OUTER
JOIN phrase in the FROM clause.
|
This query produces the following results:
|