I'm not sure the previous query will work (apologies if it does). Anyway something like the following might work better and be easier to expand if you need to match against 3 categories etc:
Code:
select prod_id
from ur_table
where cat_id in ( 1,2 )
group by prod_id
having count( distinct cat_id ) = 2;
Mike