日期:2014-05-18 浏览次数:20481 次
select * from tb t where exists(select 1 from tb where id!=t.id and col1=t.col1 and col2=t.col2)
------解决方案--------------------
select ID,Col1,Col2,Col3 from(
select px=count(1)over(partition by Col1,Col2,Col3),* from tb)t
where px>=2