oracle8.1.6 select case when count(*) = 0 then 0 else 1 end from category_object_map where category_id = :my_category_id