sql.nullif

sql.nullif(
   expr1 as Sequence,
   expr2 as Sequence
) as Sequence

Summary

Returns a NULL value if the two specified values are equal. Returns the first value if they are not equal

Parameters
expr1 First expression to be evaluated.
expr2 Second expression to be evaluated.

Example

sql.nullif(1,1) 
=>
NULL
Powered by MarkLogic Server | Terms of Use | Privacy Policy