Asked:2023-09-27 19:14:56 +0000 UTC2023-09-27 19:14:56 +0000 UTC2023-09-27 19:14:56 +0000 UTC
在 select 中将类型设置为布尔值而不是位
772
源表有一个位类型列,接受值 0、1 或 null。
要求
select *,
case
when a.is_credit_cmp = 0 then false
when a.is_credit_cmp = 1 then true
when a.is_credit_cmp = NULL then NULL
end
as is_credit_bool
from emitent as a;
小提琴