• Not always it depends on ANSI_NULLS setting

    This is from books online:

    Care must be taken when comparing null values. The behavior of the comparison depends on the setting of the SET ANSI_NULLS option.

    When SET ANSI_NULLS is ON, a comparison in which one or more of the expressions is NULL does not yield either TRUE or FALSE; it yields UNKNOWN. This is because a value that is unknown cannot be compared logically against any other value. This occurs if either an expression is compared to the literal NULL, or if two expressions are compared and one of them evaluates to NULL. For example, this comparison always yields UNKNOWN when ANSI_NULLS is ON:

    ytd_sales > NULL

    This comparison also yields UNKNOWN any time the variable contains the value NULL:

    ytd_sales > @MyVariable

    Use the IS NULL or IS NOT NULL clauses to test for a NULL value. This can add complexity to the WHERE clause. For example, the Region column in the Northwind Customers table allows null values. If a SELECT statement is to test for null values in addition to others, it must include an IS NULL clause:

    SELECT CustomerID, CompanyName, Region

    FROM Northwind.dbo.Customers

    WHERE Region IN ('WA', 'SP', 'BC')

    OR Region IS NULL

    Transact-SQL supports an extension that allows for the comparison operators to return TRUE or FALSE when comparing against null values. This option is activated by setting ANSI_NULLS OFF. When ANSI_NULLS is OFF, comparisons such as ColumnA = NULL return TRUE when ColumnA contains a null value and FALSE when ColumnA contains some value besides NULL. Also, a comparison of two expressions that have both evaluated to null values yields TRUE. With ANSI_NULLS set OFF, this SELECT statement returns all the rows in the Customer table for which Region is a null value:

    SELECT CustomerID, CompanyName, Region

    FROM Northwind.dbo.Customers

    WHERE Region = NULL

    Regardless of the ANSI_NULLS setting, Null values are always considered equal for the purposes of the ORDER BY, GROUP BY, and DISTINCT keywords. Also, a unique index or UNIQUE constraint that allows NULL can contain only one row with a NULL key value. A subsequent row with NULL is rejected. A primary key cannot have NULL in any column that is part of the key.

    Computations involving NULL evaluate to NULL because the result must be UNKNOWN if any of the factors is unknown. For example, column1 + 1 evaluates to NULL if column1 is NULL.

    When the columns being searched include those defined as allowing null values, you can find null or nonnull values in the database with this pattern:

    WHERE column_name IS [NOT] NULL

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]