Example
Compare two expressions:
SELECT NULLIF(25, 25);
Definition and Usage
The NULLIF() function returns NULL if two expressions are equal, otherwise it returns the first expression.
Syntax
NULLIF(expr1, expr2)
Compare two expressions:
SELECT NULLIF(25, 25);
The NULLIF() function returns NULL if two expressions are equal, otherwise it returns the first expression.
NULLIF(expr1, expr2)
Return the first non-null value in a list:
SELECT COALESCE(NULL, NULL, NULL, 'iampsp.com', NULL, 'Example.com');
The COALESCE() function returns the first non-null value in a list.
COALESCE(val1, val2, ...., val_n)