NULLIF()

The NULLIF() function returns NULL if two expressions are equal, otherwise it returns the first expression.


SELECT NULLIF(25, 25);

Output:
NULL

SELECT NULLIF(25, 26);

Output:
25