【mysql】sum处理null的结果
时间:2021-07-01 10:21:17
帮助过:13人阅读
IFNULL(sum(security_code_total),
0) createSCNum,
IFNULL(sum(print_num),
0) privateScNum
FROM
security_code_config
WHERE
tid = ‘test_tenement_123‘
AND
DATE_FORMAT(create_date, ‘%Y-%m‘)
= DATE_FORMAT(
‘2019-03-01 11:32:54‘,
‘%Y-%m‘)
使用IFNULL(查询值,0)
【mysql】sum处理null的结果
标签:HERE esc ota select creates creat ifnull conf uri