Function NullIf() Foundation
Returns a NIL/NULL value if the two specified expression values are equivalent
NullIf( <Expression> , <Expression> ) --> lEqual
NullIf() returns the first <Expression> if two expressions are not equivalent. If the expressions are equivalent, NullIf() returns a NULL/NIL value.
The function NullIf() can be used to perform the inverse operation of the Coalesce() function. The following pseudo code illustrates a typical scenario for the usage of the function NullIf().
In the sample code below, the function Coalesce() is used to transform data for input/output handling. Lateron the function NullIf() is used to write back changed data to the database field. If data has not been changed, the database field retains its NULL/NIL value.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.