RIGHT JOIN is the mirror of LEFT JOIN: every row from the right table is kept.
FULL OUTER JOIN keeps every row from both tables, with NULLs where there is no match.
In the example, order 1012 (customer 99 does not exist) and customers without orders both appear.
MySQL does not support FULL JOIN; combine a LEFT JOIN and a RIGHT JOIN with UNION instead.
💡 Key Takeaways: SQL RIGHT & FULL JOIN
Mastering SQL RIGHT & FULL JOIN helps you write clean and reliable SQL code. Follow standard conventions, test edge cases, and keep logic simple. Try running the code example below and complete the exercises to build confidence.
SQL RIGHT & FULL JOIN Code Example
SQL
SELECT c.CustomerName, o.OrderID
FROM Customers c
RIGHT JOIN Orders o ON o.CustomerID = c.CustomerID;
SELECT c.CustomerName, o.OrderID, o.Status
FROM Customers c
FULL OUTER JOIN Orders o ON o.CustomerID = c.CustomerID
WHERE c.CustomerID IS NULL OR o.OrderID IS NULL;
Free sign-in required · Google login available
SQL RIGHT & FULL JOIN Practice Exercises
Check what you learned in “SQL RIGHT & FULL JOIN”.
/ 3 solved
Fill in the blank
Keep every row from both tables.
SELECT * FROM Customers c Orders o ON o.CustomerID = c.CustomerID;
✓ Correct!Not quite. Try again.
Multiple choice
Which database does NOT support FULL JOIN?
✓ Correct!Not quite. Try again.
Code challenge
Using a RIGHT JOIN from Customers to Orders, select the OrderID of orders that have no matching customer.
Write the code in the live editor. Your answer is checked automatically.