sql查2张表出不相同部分
a表
name
a
b
c
b表
name1
aa
a
a1
b
c
c1
要查出
aa
a1
c1
[解决办法]
- SQL code
select name1 from b表 except select name from a表
[解决办法]
[解决办法]
- SQL code
select distinct a.search from a full join b on checksum(a.search)=checksum(b.Name)where a.id is null or b.id is NULL
[解决办法]
没有什么好的方法了?
[解决办法]
- SQL code
select name from a where not exist(select * from b where name1=a.name)unionselect name1 from b where not exist (select * from a where name=b.name1)