我用以下两种方法解决:
1.select a/case when b=0 then 1 else b end as c;

2.select  case when b=0 then null else a/b end;(推荐)

相关文章:

  • 2021-10-03
  • 2021-09-15
  • 2022-02-26
  • 2021-05-24
  • 2021-06-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-10
相关资源
相似解决方案