Employee table has ID and NAME columns. Names can be repeated. I want to find out if there is at least one row with name like \'kaushik%\'.
So query should return true/f
How about:
select max(case when name like 'kraushik%' then 1 else 0 end) from employee
Or, what might be more efficient since like can use indexes:
like
select count(x) from (select 1 as x from employee where name like 'kraushik%' ) t where rownum = 1