Loading TOC...

MarkLogic 9 Product Documentation
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

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