T-SQL

T-SQL : Incorrect comparison with NULL

Classification

Overview

The application performs incorrect comparison to NULL using =, !=, or <>. In the ANSI SQL standard, the value of NULL is defined as unknown. It is not equal to anything, not even another NULL value. Also, a null value is never not equal to another value. By default, T-SQL complies to the standard, but it can be changed using the SET ANSI_NULLS OFF command. It is recommended to make all T-SQL code ANSI compliant.

LOW

DerScanner Severity Score

Check your T-SQL code for this vulnerability, free

Request a free pilot of DerScanner. We give you access and help with the first scan. It works in the cloud and on-premise.

Try it on your code, free

By submitting this form, I acknowledge that DerScanner may process my personal data I provided above for purposes explained above. More details about the processing.

How DerScanner analyses T-SQL code