Null Values

Null values are columns in a row which have no value.

If a column in a row has no value, then the column is said to be Null, or to contain Null. Use a Null when the actual value is not known or when a value would not be meaningful.

Null Values in Sybase CEP Functions

Nearly all predefined scalar functions return Null when given a Null argument.

Most aggregate functions ignore Nulls. For example, consider a query that averages the five values 500, NULL, NULL, NULL, and 1500. Such a query ignores the Nulls and calculates the average to be (500+1500)/2 = 1000.

Null Values and Comparison Conditions

To test for Nulls, use IS NULL and IS NOT NULL. Do not use a comparison operator to test whether a value is Null. Since Null represents an unknown value, the result is also unknown, and therefore the result of the comparison is Null.

WHERE x != NULL -- WRONG!
WHERE X IS NOT NULL -- RIGHT