Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » UltraLite - Database Management and Reference » UltraLite SQL Function Reference » Alphabetical list of functions

ISDATE function [Data type conversion] Next Page

ISNULL function [Miscellaneous]

Returns the first non-NULL expression from a list. This function is identical to the COALESCE function.


ISNULL( expression, expression [, ...] )


expression    An expression to be tested against NULL.

At least two expressions must be passed into the function, and all expressions must be comparable.


The return type for this function depends on the expressions specified. That is, when the database server evaluates the function, it first searches for a data type in which all of the expressions can be compared. When found, the database server compares the expressions and then returns the result (the first non-NULL expression) in the type used for the comparison. If the database server cannot find a common comparison type, an error is returned.

See also
Standards and compatibility

The following statement returns the value -66.

SELECT ISNULL( NULL ,-66, 55, 45, NULL, 16 );