Right Join

SQL RIGHT JOIN

The RIGHT JOIN returns all rows from the table B, whether or not there is a match with table A.

SQL Right Join syntax

SELECT column_name(s)
FROM A_table RIGHT JOIN B_table
ON A_table.column_name = B_table.column_name;

Training_Course

IDNAMEDURATIONPRICE
1SQL5200
2T-SQL7700
3MySQL5600
4PL/SQL7800
5PostgreSQL6500

Certifications

IDNAMEPRICEID_TC
1PostgreSQL certification8005
2SQL certification3501
3T-SQL certification10002
4Oracle-SQL certification2000NULL

Example

SELECT c.ID,c.NAME,c.PRICE
FROM Training_Course t RIGHT JOIN Certifications c 
ON t.ID = c.ID_TC ;

Results

IDNAMEPRICE
1PostgreSQL certification800
2SQL certification350
3T-SQL certification1000
4Oracle-SQL certification2000