Question
What is the difference between UNION
and UNION ALL
?
Answer
When combining data from multiple tables, UNION
will remove duplicates in the resulting table (ie. rows where the values in all selected columns are the same), whereas UNION ALL
will not.