📖
Theory
Understand the concept step by step
RIGHT JOIN returns all rows from the right table.
When there is no matching row in the left table, columns from the left table contain NULL values.
💻
Example
See how the concept works in SQL
SQL
SELECT users.name, orders.amount
FROM users
RIGHT JOIN orders
ON users.id = orders.user_id;📤
Output
Understand what the query produces
All orders are returned, including orders without a matching user.
📝
Practice
Test your understanding
Use a RIGHT JOIN to preserve every row from a second table.
❓
MCQs
Check your SQL knowledge
What is the main concept covered in RIGHT JOIN?
A.All rows from the right table
B.Only matching rows
C.All rows from the left table
D.Only NULL rows
💼
Interview Questions
Prepare for SQL interviews
1
Interview Question
What does RIGHT JOIN preserve?
2
Interview Question
What happens when no left-side match exists?
3
Interview Question
How can RIGHT JOIN often be rewritten?