select * from a where not exists (select 1 from b where b.name=a.name and b.age=a.age);
with a as( select '小明' name,22 age from dual union all select '小王',21 from dual), b as( select '小明' name,22 age from dual) select * from a where not exists(select 1 from b where b.name=a.name and b.age=a.age)NAME AGE ---- ---------- 小王 21
select * from a where not exists (select 1 from b where b.name=a.name and b.age=a.age);
select '小明' name,22 age from dual
union all
select '小王',21 from dual),
b as(
select '小明' name,22 age from dual)
select * from a
where not exists(select 1 from b where b.name=a.name and b.age=a.age)NAME AGE
---- ----------
小王 21
select * from a where not exists (select 1 from b where b.name=a.name and b.age=a.age);
minus
select * from b