Oracle: Right Outer Join Or Right Join

Right join in Oracle is also represented by the name of Right Outer Join. If Right Join applies between two tables, helps to find the values that are common in both the table, along with all values present in right table.

Follow the diagram below for better understanding:

right Join

Syntax

Select Column from Table1 Right Join Table2
on Table1.column= Table2.column;

Example

We have two Tables Stu and Marks1. Marks1 contains all the marks of students present in Stu Table along with some extra values.

Follow below for Stu Table:

Stu Table

Refer below for Marks1 Table:

Marks1 Table

Now to apply Right Join in both the able Table, Code will be as follows:

Select * from Stu s right join Marks1 m
on s.Roll_no = m.Roll_no;

Output

right Join