Antra Interview Question

What is the diff between union and union all?

Interview Answers

Anonymous

Aug 28, 2019

union: combine two table without duplication union all: with duplication

Anonymous

Mar 4, 2017

Union statement combines result of two or more SELECT statement, the UNION statement only select distinct values, while UNION ALL select all the values including the duplicates.