Database Reference
In-Depth Information
Figure 5-16.
Using NOT IN operator
How It Works
You specify three columns of the Address table.
select AddressID, AddressLine1, City
from Person.Address
You specify the list operator
NOT IN
with the city name you do not want to include the records for.
Hence, it filters 19,311 records for the cities other than what we listed in the
NOT IN
list. If you scroll
down, you will not see any record belonging to any of the mentioned cities.
where City not in ('Bellevue', 'Redmond', 'Seattle')