An Engineers Notebook

SQL: What is ANSI NULLS?

In SQL by default ANSI NULLS is switched ON and this means that “NULL does not equal NULL”. To prove this we can write some code.

SET ANSI_NULLS ON
GO

IF NULL = NULL
    PRINT ‘yess… null=null’
ELSE
    PRINT ‘no… null<>null’

Leave a Reply

Your email address will not be published.