日期:2014-05-18 浏览次数:20575 次
select * from tb t where exists (select 1 from tb where B1 = t.B1 and A1 <> t.A1)
------解决方案--------------------
select * from tb t where exists (select 1 from tb where B1 = t.B1 and A1 <> t.A1)
------解决方案--------------------
select * from tb t where exists (select 1 from tb where B1 = t.B1 and A1 <> t.A1) --或者 select * from tb where B1 in (select B1 from tb group by B1 having count(B1)>1)