thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Data & Analytics · Foundational

UNION ALL

A set operator that stacks the results of two queries and keeps all rows, including duplicates.

Definition

UNION ALL skips deduplication, so it is faster than UNION. It is the right choice when the inputs cannot overlap, such as monthly partitions, or when duplicates matter for counts.

Example

SELECT * FROM Sales_2025 UNION ALL SELECT * FROM Sales_2026;

Exam tip

If the scenario asks for the most efficient way to combine non-overlapping sets, choose UNION ALL.

Related terms