Machine-translated by Google. Questions are authored in English.
Top

Discussion

Which SQL join returns all rows from both tables, with NULL values for non-matching rows ?

  • A.INNER JOIN
  • B.LEFT JOIN
  • C.RIGHT JOIN
  • D.FULL OUTER JOIN

Answer: D

The join is the FULL OUTER JOIN.

A full outer join returns every matched row plus the unmatched rows from both tables, filling the missing side's columns with NULL. It is in effect the union of a left and a right outer join.

An INNER JOIN returns only matching rows. A LEFT JOIN keeps all rows of the left table, with NULLs for unmatched right-hand columns, and a RIGHT JOIN does the same for the right table. Each of them keeps the unmatched rows of one table only.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.