Hi
From BOL:
The SQL-92 standard requires that an equals (=) or not equal to (<>)
comparison against a null value evaluates to FALSE. When SET ANSI_NULLS is
ON, a SELECT statement using WHERE column_name = NULL returns zero rows even
if there are null values in column_name. A SELECT statement using WHERE
column_name <> NULL returns zero rows even if there are nonnull values in
column_name.
When SET ANSI_NULLS is OFF, the Equals (=) and Not Equal To (<>) comparison
operators do not follow the SQL-92 standard. A SELECT statement using WHERE
column_name = NULL returns the rows with null values in column_name. A SELECT
statement using WHERE column_name <> NULL returns the rows with nonnull
values in the column. In addition, a SELECT statement using WHERE column_name
<> XYZ_value returns all rows that are not XYZ value and that are not NULL.
There are several features that will not work when ANSI_NULLS is off such as
distributed queries and indexed views.
John
[quoted text, click to view] "Meetu" wrote:
> Thank you David ,John,Razvan and R.D. for replying.
>
> I find the use of isnull(cc_status,'') useful, but I didnt understand
> one thing why Razvan mentioned that Set ansi_null off is not
> recommended? Razvan can you elaborate on this one? Thanks
>