The RIGHT JOIN keyword Return all rows from the right table (table_name2), even if there are no
matches in the left table (table_name1).
PS: In some databases RIGHT JOIN is called RIGHT OUTER JOIN.
The "Persons" table:
The "Purchases" table:
Now we want to list all the Purchases with containing persons - if any, from the tables
We use the following SELECT statement:
The result-set will look like this:
The RIGHT JOIN keyword returns all the rows from the right table (Purchases), even if there are
no matches in the left table (Persons).
Your Query was successfully sent!