oracle case when exists()

用法如下:

select case when exists(select 1 from t_test c where c.name = 'zhangsan'
    and c.age = 23 ) then 1 else 0 end
from dual;

 

posted @ 2017-05-03 11:32  左正  阅读(1999)  评论(0编辑  收藏  举报