Subqueries Used with not in

Subqueries that are introduced with the keyword phrase not in also return a list of values that are zero (0) and greater.

not in means “not = a and not = b and not = c.”

This query finds the names of the publishers who have not published business books:

select pub_name from publishers 
where pub_id not in 
   (select pub_id 
    from titles 
    where type = "business")
Binnet & Hardley 

The query is the same as the previous one except that not in is substituted for in. However, you cannot convert this statement to a join; the “not equal” join finds the names of publishers who have published some book that is not a business book.

Related concepts
Subqueries Used with in
Joins: Retrieve Data from Several Tables