SELECT IFNULL(sum(c.tax_data),0) ,IFNULL(SUM(c.fiscal_ret),0)   FROM corp_tax c WHERE c.industry_id = 100
   
    and c.corp_year =2018 and c.corp_month =6 and c.status = 1 and park_id=1

使用ifnull(expr,expr) 来处理。上面的sql  sum(c.tax_data) 如果是null 则返回0.

相关文章:

  • 2022-12-23
  • 2021-06-11
  • 2022-01-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-13
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-17
  • 2022-02-11
  • 2022-12-23
相关资源
相似解决方案