第一种:

select sum(decode(count1,null,0,count1) +decode(count2,null,0,count2)
+decode(count3,null,0,count3)) a from test_table

第二种:

select sum (case when count1 is not null then count1 when 
count2 is not null then count2 when count3 is not null 
then count3 else '0' end ) a from test_table

  

相关文章:

  • 2022-12-23
  • 2021-09-22
  • 2021-12-10
  • 2021-11-22
  • 2021-06-15
  • 2021-06-23
  • 2022-12-23
  • 2021-10-18
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案