在oracle 的case里 如果我需要两个条件都必须满足怎么写 用了and 但是还是不行

比如 case when a.字段!=null and b.字段!=null then ✀好蛋疼的问题✀
2025-05-01 07:57:33
推荐回答(4个)
回答1:

case when a.字段!=null && b.字段!=null then '好蛋疼的问题' then ... else ... end

&&是与操作

回答2:

你确定你哪个是oracle的?
case when a.字段 is not null and b.字段 is not null then 'a' else 'b' end
这样肯定是好用的。

回答3:

不能写 !=null
需要写为:is not null

回答4:

找本oracle pl/sql看看吧