Reputation: 33
Is there any difference or best practices between the following two statements, syntax, performance, style, or otherwise?
SELECT TitleOfCourtesy, FirstName, LastName
FROM Employees
WHERE NOT TitleOfCourtesy IN ('Ms.','Mrs.');
SELECT TitleOfCourtesy, FirstName, LastName
FROM Employees
WHERE TitleOfCourtesy NOT IN ('Ms.','Mrs.');
Upvotes: 2
Views: 297
Reputation: 96
Using the Where... NOT IN
is the one I've come across the most and in terms of the industry it is preferred in order to make the statement more readable for others who aren't accustomed to seeing Where NOT ... IN
.
Upvotes: 3