Junior SQL

What is the difference between UNION and UNION ALL?

  • UNION: Combines the result sets of two or more queries and removes duplicate

rows.

  • UNION ALL: Combines the result sets of two or more queries and includes all rows,

even duplicates.

Joins & Queries

More from SQL Server Tutorial

All questions for this course