Exclude a range of rows
The following query uses the keywords NOT BETWEEN to exclude
rows that have the character range 94000 through 94999 in the zipcode column,
as the result shows.
Figure 1. Query
SELECT fname, lname, city, state
FROM customer
WHERE zipcode NOT BETWEEN '94000' AND '94999'
ORDER BY state;
Figure 2. Query
result
fname lname city state
Frank Lessor Phoenix AZ
Fred Jewell Phoenix AZ
Eileen Neelie Denver CO
Jason Wallack Wilmington DE
Marvin Hanlon Jacksonville FL
James Henry Brighton MA
Bob Shorter Cherry Hill NJ
Cathy O'Brian Princeton NJ
Kim Satifer Blue Island NY
Chris Putnum Bartlesville OK