MySQL SUM() function will return 0, rather than NULL, along with a warning on getting the character type column as its argument. Following example using data from table named ‘Social’ will illustrate it −
Example
mysql> Select * from Social; +------+-------+ | Id | Name | +------+-------+ | 100 | Rahul | +------+-------+ 1 row in set (0.00 sec) mysql> Select SUM(Name) From Social; +-----------+ | SUM(Name) | +-----------+ | 0 | +-----------+ 1 row in set, 1 warning (0.00 sec)