SELECT CAST( CASE WHEN EXISTS(SELECT * FROM theTable where theColumn like 'theValue%') THEN 1 ELSE 0 END AS BIT)
我只想要一个使用存在的oracle查询,它像上面一样返回0或1.
select count(*) from dual where exists (SELECT * FROM theTable where theColumn like 'theValue%')