一.

 case [字段]
         when '要比较的值' then 表达式
         when '要比较的值' then 表达式
         else ''
      end 

示例

select 
(case ApplyAmount
when null then 0 --判断为空时,取0
else ApplyAmount end) as ApplyAmount
from HTFKApply

二.

case 
    when [条件] then 表达式
    when [条件] then 表达式
    else ''
 end 

示例

select
case when (a.ApplyAmount is null) then 0
else a.ApplyAmount end as ApplyAmount from HTFKApply

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-29
  • 2022-12-23
  • 2022-12-23
  • 2021-07-13
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-15
  • 2022-12-23
相关资源
相似解决方案