Is it safe to use SUM() without ISNULL()

后端 未结 4 863
轮回少年
轮回少年 2021-02-18 14:14

I am trying to hence the performance of an SP. I have a doubt in my mind about SUM and ISNULL. When I sum up a column, should I use ISNULL? Is it SAFE to use SUM() without ISNUL

4条回答
  •  终归单人心
    2021-02-18 14:53

    Its not mandatory to use NULL and COALESCE while doing SUM because SUM always ignore null values.

    Refer the link : https://msdn.microsoft.com/en-IN/library/ms187810.aspx for more info.

提交回复
热议问题