SQL Server COALESCE() Function

The COALESCE() function returns the first non-null expression in a list.

Syntax

COALESCE(expr1, expr2, ...., expr_n)
Example:
SELECT COALESCE(NULL,NULL, 1, 2, 'TEST');
Return the first non-null expression in a list:

Post a Comment

0 Comments