HomeInterview QuestionsExplain joins in SQL.

Explain joins in SQL.

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

💡 Model Answer

In SQL, a join combines rows from two or more tables based on a related column. The most common types are:

  • INNER JOIN: returns rows where the join condition is true in both tables.
  • LEFT (OUTER) JOIN: returns all rows from the left table and matching rows from the right; unmatched right rows are NULL.
  • RIGHT (OUTER) JOIN: opposite of LEFT.
  • FULL (OUTER) JOIN: returns rows when there is a match in either table.
  • CROSS JOIN: returns the Cartesian product of the two tables.
  • SELF JOIN: a table joined to itself, useful for hierarchical data.

Example: SELECT e.name, d.name FROM employees e JOIN departments d ON e.dept_id = d.id; This returns employee names with their department names where dept_id matches. Joins are fundamental for relational data retrieval and enable complex queries across multiple 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