-- 情况1: select id from dual d where d.id ='0001' or d.id ='0002' and d.count >900; -- 结果:将后两个条件合并,在于条件1取或,即:如下图。 select id from dual d where d.id ='0001' or (d.id ='0002' and d.count >900);
-- 情况2: select id from dual d where (d.id ='0001' or d.id ='0002') and d.count >900; -- 结果:将前两个条件合并取或,再与条件3取并集。