22,209
社区成员
发帖
与我相关
我的任务
分享
select * from b
except
select * from a
;with tb as
(
select
t1.f1, t1.f2, t1.f3, t2.f1 as f4
from 表B as t1
left join 表A as t2
on t1.f1 = t2.f1
and t1.f2 = t2.f2
and t1.f3 = t2.f3
)
select f1, f2, f3 from tb where f4 is null
select * from 表B a where not exists (select * from 表A where f1=a.f1 and f2=b.f2 and f3=a.f3)
试试这个