Loading TOC...

MarkLogic Server 11.0 Product Documentation
sql:nullif

sql:nullif(
   $expr1 as item()*,
   $expr2 as item()*
) as item()*

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

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.