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 · Intermediate

INTERSECT Operator

A set operator that returns only the distinct rows present in both query results.

Definition

INTERSECT finds the common rows between two compatible result sets and removes duplicates. It is equivalent to a semi join on every selected column, but it treats NULLs as equal to each other.

Example

SELECT CustomerID FROM Orders2025 INTERSECT SELECT CustomerID FROM Orders2026;

Exam tip

INTERSECT = in both; EXCEPT/MINUS = in the first but not the second; UNION = in either.

Related terms