Both placements of the NOT keyword are logically equivalent and produce the same results. NOT before the expression in parentheses inverts the result of this expression, but this is normal logic and does not apply to SQL.
In T-SQL, execution plans are the same in SQL Server 2014 and SQL Server 2016 for your examples (assumption: the table has a primary key and the country not indexed).
There is one caveat, especially with the examples you cited: The IN operator behaves differently than might be expected when its argument contains NULL values. For Oracle, see here ;
for T-SQL, consider this:
select 1 where 'A' in (null)
This will not return a string. Which looks trivial, but:
select 1 where 'A' not in (null)
This statement does not return a string. Now we can argue that if we logically invert an expression from the first statement like this, it should definitely return a string:
select 1 where not ('A' in (null))
But this is not so, because IN (NULL) evaluates neither true nor false .
source share