SQL> select * from a;
A BB
- ----------
a 1
a 2
b 1
b 2
b 3
a 3
已选择6行。
SQL> select * from b;
A BB
- ----------
a 1
a 2
b 1
b 2
SQL> select * from a
2 minus
3 select * from b;
A BB
- ----------
a 3
b 3
select a.* from a表 a left join b表 b
on a.name=b.name and a.id=b.id
where b.id is NULL and b.name is NULL;

被折叠的 条评论
为什么被折叠?



