dcsimg
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: SQL
Expertise: Beginner
Jul 22, 2019

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


T-SQL Performance Tip: NOT IN vs NOT EXISTS

Avoid using NOT IN whilst comparing nullable columns. Use NOT EXISTS instead.

When NOT IN is used in a query, SQL Server compares each result to null (even if no rows are returned). NOT EXISTS does not perform a comparison with nulls.

Hannes du Preez
 
Thanks for your registration, follow us on our social networks to keep up-to-date