The SQL right join performs an inner join first with the matching values from the left table and the right table and then it returns all other records that are present in the right table and not present in the left table.
Example
Table_1
create table Table_1 (A
varchar);
Insert into Table_1 (A)
values
('x'),('x'),('z'),('0');
select * from Table_1;
create table Table_2 (A
varchar);
Insert into Table_2 (A)
values
('y'),('x'),('0'),('x');
select * from Table_2;
Syntax
--Right join--
select *from Table_1 T1
right join Table_2 T2
on T1.A=T2.A;