【发布时间】:2012-06-18 02:07:08
【问题描述】:
如果行有,我想排除加入(相同的工具和相同的配方) 当我运行以下代码时
select a.tool, a.recipe
from dual a
where a.tool NOT IN (select b.tool from daul2 b)
and a.recipe NOT IN (select b.recipe from dual2 b)
它首先过滤工具,然后是配方,但我希望程序同时检查它。
有没有办法同时检查两列?
【问题讨论】:
-
选择“dual”以外的示例表名可能是个好主意,因为这是 Oracle 中的一个特殊表。