About
A “Right Outer” join is interpreted as show me all data from the right table and any matches with the left table. It's a reverse left outer join
In other words, RIGHT OUTER JOIN means that the “right” table is preserved and the “left” table should be added with NULLs if no match is found.
Articles Related
Example
table1 (inner set) | table2 (outer set) |
|
---|---|---|
Column ID | Column ID | Column ID_2 |
A | A | |
B | B | A |
D | C | C |
gerardnico@orcl>select table1.id "ID_table1", table2.id "ID_table2"
2 from table1 RIGHT OUTER JOIN table2
3 on table1.id = table2.id;
ID_table1 ID_table2
---------- ----------
A A
B B
C
All the data from the table2 appears even if for the value C, we don't have any match with the table1.