SELECT
    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)

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-10
  • 2022-12-23
  • 2022-12-23
  • 2022-02-18
  • 2021-06-30
猜你喜欢
  • 2021-11-13
  • 2021-08-16
  • 2021-07-05
  • 2021-10-11
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
相关资源
相似解决方案