Learn SQL
IN & NOT IN
8.3
Lesson

Select using NOT IN

Find all students who do not belong to grade 2, 3, 5, 7 or 11.

We can do this using OR operator.

A simpler and shorter way of doing it is by using NOT IN.

We can see that NOT IN does exactly the opposite of what IN does.