1. Home
  2. Data Science
  3. SQL for Data Analysis
  4. What does UNION do that UNION ALL does not?

Added 30 Nov -0001

What does UNION do that UNION ALL does not?

  1. Combines columns, not rows
  2. Removes duplicate rows Correct answer
  3. Keeps duplicate rows
  4. Sorts by the first column

Correct answer

B. Removes duplicate rows

14 views

MCQSEXAM

Explanation

UNION eliminates duplicate rows, which costs a sort or hash step, while UNION ALL keeps everything.

Reference

Asked in: NTS, PPSC IT, Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More SQL for Data Analysis MCQs

Practise all SQL for Data Analysis MCQs

Similar MCQs