34,838
社区成员




select a.B,a.D from x a, x b where a.B=b.B and a.D=b.D
--如果想直接排列出顺序,便于查看就加上排序
select * from table_Pqs Pqs
where Exists(select 1 from table_Pqs
where b=Pqs.b and d=Pqs.d And id<>table_Pqs.id)
Order By b,d
--如果作为一条记录显示 那就如上用inner join方式,但就结果而言应该是反复出现了2次
select * from table_Pqs Pqs
where Exists(select 1 from table_Pqs
where b=Pqs.b and d=Pqs.d And id<>table_Pqs.id)