But in the last record I don't have a sent record or a reciprocal accepted record; how will an inner join work?
💡 Model Answer
An inner join returns only rows that have matching keys in both tables. If a row in the left table has no matching key in the right table, or vice versa, that row is omitted from the result set. In your scenario, if the last record lacks either a sent or an accepted counterpart, the inner join will exclude that record entirely. To include such rows, you would use a LEFT JOIN (to keep all rows from the left table) or a FULL OUTER JOIN (to keep all rows from both tables). For example, SELECT s., a. FROM sent s LEFT JOIN accepted a ON s.id = a.id; will return all sent records, with NULLs for missing accepted data.
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