比如表A中
字段1 字段2
1 a
2 a
1 b
1 b
2 a
用sql语句实现查询,查询出
1 a
1 b
select distinct x.字段一,x.字段二
from a as x,a as y
where x.字段一=y.字段一 and x.字段二!=y.字段二
select distinct x.字段一,x.字段二
from a as x,a as y
where x.字段一=y.字段一 and x.字段二!=y.字段二