SQL Query Returning Unwanted Results I must be setting up the And/OR portion of my query incorrectly.  In the sample dataset below, after filtering out the criteria in my Where clause only FR ni23 should be returned, however my query returns

resonance   userid&lt;br&gt;
Del         er12&lt;br&gt;
NULL        em23&lt;br&gt;
Samit       ra23&lt;br&gt;
            em23&lt;br&gt;
FR          ni23&lt;br&gt;


This is the syntax I attempted, but is not accurate, where does the problem lie, and what should I change to fix?

Declare @T1 Table (resonance varchar(100), userid varchar(10))

Insert Into @T1 (resonance, userid) Values
('Del', 'er12'), (NULL, 'em23'), ('Samit', 'ra23'), 
(NULL, 'axel'), ('', 'em23'), ('', 'red'), ('FR', 'ni23')

Select *
FROM @T1
WHERE userid LIKE '%[0-9]%'
AND (resonance &lt;&gt; 'DEL' OR resonance IS NULL OR resonance &lt;&gt; 'Samit')
But still returns the record where resonance = ''

Select *
FROM @T1
WHERE userid LIKE '%[0-9]%'
    AND resonance not in ('DEL','Samit') 


You should define it as:

Select *
FROM @T1
WHERE userid LIKE '%[0-9]%'
    AND resonance not in ('DEL','Samit','')