Programming · Flashcard

What does a LEFT JOIN return?

  • AAll rows from the left table — right-side columns are NULL where no match exists
  • BAll rows from the right table — left-side columns are NULL where no match exists
  • COnly left-table rows that have a match — unmatched left rows are filtered out
  • DAll rows from both tables — every unmatched row is padded with NULLs on either side

Why this is the answer

LEFT JOIN preserves every left row; where the right table has no match, its columns come back NULL. Preserving the right side is RIGHT JOIN, keeping only matches is INNER JOIN, and preserving both sides is FULL OUTER JOIN.

Official docs
Study in Gnoseed →