Multiple Choice Questions - Joins & Nulls
1. When there are null values in the columns of the tables being joined, the null values . . . . . . . . each other.
A) match
B) do not match
2. When joining on a nullable column, remember that the equality operator returns . . . . . for Null = Null.
A) False
B) True
C) Error
D) Warning
3.
Table t1:
tvalue |
---|
0000 |
1111 |
Null |
Null |
Table t2:
tvalue |
---|
Null |
1111 |
2222 |
Null |
Which of the following query / queries will return result with "Nulls" including:
A)
Select a.tvalue, b.tvalue from t1 a inner join t2 b on a.tvalue = b.tvalue;B)
Select a.tvalue, b.tvalue from t1 a join t2 b on a.tvalue = b.tvalue;C)
Select a.tvalue, b.tvalue from t1 a full outer join t2 b on a.tvalue = b.tvalue;D)
Select a.tvalue, b.tvalue from t1 a left outer join t2 b on a.tvalue = b.tvalue;4. Outer joins (in SQL Server) do not use existing NULL values for matching. They produce NULL values when a match doesn't exist.
A) True
B) False
5. In SQL Server as the full outer join includes the rows that are equi-joined from both tables, plus the remaining unmatched rows from the first and second tables, NULLs are added to the unmatched rows . . . . . . . . .
A) on left side
B) on right side
C) on both sides
D) None of above