What are the different types of joins in SQL?
1Times asked
May 2026Last seen
May 2026First seen
💡 Model Answer
SQL supports several join types:
- Inner Join – returns rows with matching keys in both tables.
- Left (Outer) Join – returns all rows from the left table and matching rows from the right; unmatched right values are NULL.
- Right (Outer) Join – returns all rows from the right table and matching rows from the left; unmatched left values are NULL.
- Full (Outer) Join – returns all rows from both tables, filling missing side values with NULL.
- Cross Join – returns the Cartesian product of two tables, combining every row of the first with every row of the second.
- Self Join – a table joined to itself, useful for hierarchical or recursive queries.
- Natural Join – automatically joins on columns with the same name in both tables.
- Theta Join – a join using a condition other than equality (e.g., <, >).
These joins allow flexible data retrieval patterns depending on the relationship between tables.
This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.
🎤 Get questions like this answered in real-time
Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers — invisible to screen sharing.
Get Assisting AI — Starts at ₹500