In an Outer Join, what happens to columns that are not matched?
-
All matched columns returns NULLS.
-
All unmatched columns returns NULLS.
-
All matched and unmatched columns returns NULLS.
-
Cant say
In an outer join operation, columns from the non-preserved side (the table that may not have matching rows) return NULL for unmatched rows. Matched columns from both sides return their actual values, not NULL. Option A is incorrect because matched columns don't return NULL - only the unmatched columns from the non-preserved table do.
In an OUTER JOIN, rows from one (or both) tables that have no matching row on the join condition are still included in the result, with the columns coming from the unmatched side filled in with NULL. For example, in a LEFT OUTER JOIN, every row from the left table appears even without a match, and all columns pulled from the right table for that row are NULL. Matched rows return actual data on both sides, not NULLs, so 'all matched columns return NULLS' is wrong, and 'both matched and unmatched return NULLS' overstates it.