1.

Difference Between Coalesce() & Isnull()?

Answer»
  • ISNULL accepts only 2 parameters. The first parameter is checked for NULL value, if it is NULL then the second parameter is returned, otherwise it returns first parameter.
  • COALESCE accepts two or more parameters. One can apply 2 or as many parameters, but it returns only the first non NULL parameter.
  • ISNULL does not implicitly converts the datatype if both parameters datatype are different. On the other side COALESCE implicitly converts the parameters datatype in order of higher precedence.
  • SIMILAR to above point ISNULL always returns the value with datatype of first parameter. Contrary to this, COALESCE returns the datatype value according to the precedence and datatype compatibility.



Discussion

No Comment Found