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 Operator

A set operator that combines the results of two queries into one set and removes duplicate rows.

Definition

Both queries must return the same number of columns with compatible types; the column names come from the first query. Because UNION deduplicates, it adds a sort or hash step.

Example

SELECT City FROM Customers UNION SELECT City FROM Suppliers;

Exam tip

JOIN combines columns side by side; UNION stacks rows vertically. Power Query's equivalent of UNION is Append.

Related terms