What does UNION do that UNION ALL does not?
-
A
Combines columns, not rows
-
B
Removes duplicate rows
Correct answer
-
C
Keeps duplicate rows
-
D
Sorts by the first column
Correct answer
B. Removes duplicate rows
14 views
Explanation
UNION eliminates duplicate rows, which costs a sort or hash step, while UNION ALL keeps everything.
Reference
Asked in: NTS, PPSC IT, Interviews
Doubts & discussion
Not sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ