Practice mode DBMS and SQL

Which join returns every row from both tables, filling the columns of the other table with NULL wherever no match exists?

Correct answer A. FULL OUTER JOIN

Explanation

A FULL OUTER JOIN returns matched pairs plus unmatched rows from the left table and unmatched rows from the right table, padding missing values with NULL. A LEFT OUTER JOIN keeps unmatched rows from the left side only. An INNER JOIN keeps matched pairs only. A CROSS JOIN pairs every row with every row and has no matching condition at all. Note that MySQL lacks FULL OUTER JOIN and emulates it with UNION.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.