Database Recommendation – DBMS Supporting ‘= NULL’ Syntax

database-recommendation

Inspired by a StackOverflow question (Why doesn't SQL support "= null" instead of "is null"?).

Is there a DBMS that actually supports the = NULL syntax?

Best Answer

Some implementations of SQL do recognise x = NULL as equality, the ISO/ANSI standard on the other hand does not. In SQL Server for instance, SET ANSI_NULLS OFF results in (NULL = NULL) = true.

SET ANSI_NULLS OFF
SELECT CASE WHEN NULL = NULL THEN 1 ELSE 0 END

SET ANSI_NULLS ON
SELECT CASE WHEN NULL = NULL THEN 1 ELSE 0 END