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

EXCEPT Operator

A set operator that returns distinct rows from the first query that are not in the second; Oracle calls it MINUS.

Definition

EXCEPT performs set difference and is handy for comparing datasets during testing or reconciliation. Order matters: A EXCEPT B differs from B EXCEPT A.

Example

SELECT ID FROM Source EXCEPT SELECT ID FROM Target; -- rows not yet loaded

Exam tip

Oracle uses MINUS for the same operation; Oracle Database SQL exams use that keyword.

Related terms