ORACLE 如果一个字段包含指定的值 那么另一个字段就返回为1 否则为0

2025-12-16 16:05:31
推荐回答(2个)
回答1:

select
(case when instr (x,'a')>0 or instr (x,'b')>0 or instr (x,'c')>0 then 1
else 0 end)
from r
大概是这个意思。

回答2:

select (case when instr(t.a,'b')>=0 or instr(t.a,'c')>=0 then 1 else 0 end) from table t