Wednesday, January 6, 2010

ANSI_NULLS setting

A NULL value means absence of data in the column. The default behavior of SQL Server 2008 is to set ANSI_NULLS to ON so there is no value called null as value as (1,'Star',…).
If you try to write SELECT statement as below:



You will get nothing because ANSI_NULLS ON and it prevents this way of code by default so you have to turn off the ANSI_NULLS setting as below:



Or you can write your SELECT statement as below:

No comments: