Manuals/calci/NULLIF
Jump to navigation
Jump to search
NULLIF(Value,Default)
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle Value} and Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle Default} is any string.
Description
- The NULLIF function returns a value with the type of the first argument or NULL.
- This function accepts exactly two arguments.
- Here two expressions to be compared.
- If the first argument is not equal to the second one, the NULLIF function returns the first argument.
- In case both arguments are NULL, the NULLIF function returns a NULL value.
Examples
- NULLIF(25, 25) = 25
- NULLIF('Hello', 'Hello') = Hello
- NULLIF('Hello', 'world') = Hello