IsNULL and Coalesce proper usage

后端 未结 3 521

As we have two options to intercept the null values coming from database...

  1. ISNull
  2. Coalesce

Following ar

3条回答
  •  半阙折子戏
    2021-01-22 03:15

    you may take this onto consideration.

    1. ISNULL function required two parameters: the value to check and the replacement for null values

      2.COALESCE function works a bit different COALESCE will take any number of parameters and return the first non-NULL value , I prefer COALESCE over ISNULL 'cause meets ANSI standarts, while ISNULL does not.

      I hope you found the answer to your question.

提交回复
热议问题