What will be the output of a left join, a right join, and an inner join given two tables with overlapping and non‑overlapping rows?
💡 Model Answer
A left join returns all rows from the left table and matching rows from the right table; unmatched right columns are NULL. A right join is the opposite: all rows from the right table plus matching left rows, with NULLs where there is no match. An inner join returns only rows that have matching keys in both tables. For example, if TableA has rows A1, A2 and TableB has rows B1, B2 where A1 matches B1, the left join yields A1+B1, A2+NULL; the right join yields B1+A1, B2+NULL; the inner join yields only A1+B1.
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 on a discreet on-screen overlay.
Get Assisting AI — Starts at ₹500