Use of ANSI_NULLS in Sql Server

vishalneeraj-24503
Posted by vishalneeraj-24503 under Sql Server category on | Points: 40 | Views : 627
SET ANSI_NULLS ON
IF NULL = NULL
BEGIN
PRINT 'TRUE';
END
ELSE
BEGIN
PRINT 'FALSE';
END

Output:- FALSE

SET ANSI_NULLS OFF
IF NULL = NULL
PRINT 'TRUE';
ELSE
PRINT 'FALSE';

SET ANSI_NULLS OFF
IF NULL IS NULL
PRINT 'TRUE';
ELSE
PRINT 'FALSE';

Output:- TRUE

SET ANSI_NULLS ON
IF NULL IS NULL
PRINT 'TRUE';
ELSE
PRINT 'FALSE';

Output:- TRUE

Comments or Responses

Login to post response