sql.ifnull

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

Summary

If the first expression is NULL, then the value of the second expression is returned. If not null, the first expression is returned.

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

Example

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