COALESCE
Returns the first nonnull expression among its arguments.
Syntax
COALESCE ( expression [ ,...n ] )
Limitations of COALESCE():
In COALESCE() while passing arguments,it does not support arguments with different data types in few cases.
For example:
SELECT COALESCE('A',GETDATE())
GO
-----------------------
Msg 241, Level 16, State 1, Line 1
Conversion failed when converting date and/or time from character string.
But ISNULL() can handle this
SELECT ISNULL('A',GETDATE())
GO
----
A(1 row(s) affected)
Tricky Example:
DECLARE @T VARCHAR(100)
SELECT @T = COALESCE(@T+', ','' )+NAME FROM SYS.TABLES SELECT @T