oracle case when 语句 then 之后可不可以加查询语句

2024-12-29 18:41:57
推荐回答(3个)
回答(1):

应该是不可以,

除非是 子查询:

select case when col1 = 1 then (select count(1) from tab_b ) else 0 end
from tab_a

回答(2):

可以用

回答(3):

可以