Say I have a table with a field called foo. Foo is a character field. I want to return all records where foo is:
- Not in ('ad','ca','qw')
- Not like '9%' unless it is '96321'
Here is what I have but I am tripping up on how to get '96321'
SELECT
*
FROM
mtable
WHERE
foo NOT IN ('ad' , 'ca', 'qw')
AND foo NOT LIKE '9%';