MYSQL syntax not evaluating not equal to in presence of NULL

use IS NULL or IS NOT NULL to compare NULL values because they are simply unknown.

SELECT name 
from   products p
WHERE  backorder IS NULL OR backorder <> 2

Leave a Comment