如列表所示:都是选填字段
name   age salary weight
张三     18      20
李四     17
王五     21
燕小六  15      22
sum(age+salary+weight)这种写法是不能求出这三列的和的,
因为在oracle中,18+null的结果还是null,
正确写法是:sum(nvl(age,0)+nvl(salary,0)+nvl(weight,0))

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-01
  • 2022-01-05
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2022-02-26
猜你喜欢
  • 2021-11-30
  • 2022-12-23
  • 2022-12-23
  • 2022-01-30
  • 2022-12-23
  • 2021-04-22
相关资源
相似解决方案