Use of SQL RIGHT JOIN. The following command shows how to join common data use SQL RIGHT JOIN.
SELECT table1.*, table2.column, table2.column
FROM table1
RIGHT JOIN table2
ON table1.column = table2.column;
Example:
SELECT employees.*, payments.date, payments.amount
FROM employees
RIGHT JOIN payments
ON employees.id = payments.employee_id;