HomeInterview QuestionsWhat are the different types of joins in SQL?

What are the different types of joins in SQL?

🟢 Easy Conceptual Junior level
1Times asked
May 2026Last seen
May 2026First seen

💡 Model Answer

SQL supports several join types:

  1. Inner Join – returns rows with matching keys in both tables.
  2. Left (Outer) Join – returns all rows from the left table and matching rows from the right; unmatched right values are NULL.
  3. Right (Outer) Join – returns all rows from the right table and matching rows from the left; unmatched left values are NULL.
  4. Full (Outer) Join – returns all rows from both tables, filling missing side values with NULL.
  5. Cross Join – returns the Cartesian product of two tables, combining every row of the first with every row of the second.
  6. Self Join – a table joined to itself, useful for hierarchical or recursive queries.
  7. Natural Join – automatically joins on columns with the same name in both tables.
  8. 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