Back to Blog

SQL Between

Union and Union All - How to use it in SQL Server

Combine query results with UNION and UNION ALL operators. Learn differences, performance implications, and use cases for merging data sets.

1 min read

Last updated on

Union and Union All are very similar, but if you don’t understand the differences, it can cause trouble.

In this video I do a quick demonstration of the Union and Union All Function.

I use the Wide World Importers and the following scripts:

select * from [Application].[People]

where PersonID between 1 and 5

union

select * from [Application].[People]

where PersonID between 4 and 9

See the original SQL Union and Union All video.

About Joey Blue

Joey Blue teaches practical data skills that companies actually use. With 25+ years of experience solving real data problems for Fortune 500 companies, he's helped 152,000+ students learn SQL, Power BI, reporting, and modern analytics—cutting straight to what works.