The COALESCE() function evaluates the arguments in sequence and returns the first NON-NULL value in a specified number of expressions. If it evaluates arguments as NULL or not found any NON-NULL value, it returns the NULL result.
The syntax of COALESCE function is given below:
COALESCE (exp1, exp2, .... expn)
Example:
SELECT COALESCE(NULL, 'Hello', 'Javatpoint', NULL) AS Result;
This statement will return the following output:
Answers (0)