IS [NOT] NULL (SQL Server Compact)

Determines whether or not a given expression is NULL.

Note

ISNULL() is not a supported function in SQL Server Compact.

Syntax


            expression IS [ NOT ] NULL 

Arguments

  • expression
    Any valid expression in Microsoft SQL Server Compact.

  • NOT
    Specifies that the Boolean result be negated. The predicate reverses its return values, returning TRUE if the value is NOT NULL, and FALSE if the value is NULL.

Result Types

bit

Return Code Values

If the value of expressionis NULL, IS NULL returns TRUE; otherwise, it returns FALSE.

If the value of expressionis NULL, IS NOT NULL returns FALSE; otherwise, it returns TRUE.

Example

SELECT column_name FROM table_name WHERE column_name IS NOT NULL

Remarks

To determine whether an expression is NULL, use IS NULL or IS NOT NULL instead of comparison operators, such as = or !=. Comparison operators return UNKNOWN if either or both arguments are NULL.