declare @t table(a int,b varchar(10),c int,d int,e int)
insert into @t select 1001      , 'ac'     , 10    , 20   ,  30
union all select 1001       ,'ac'     , 20    , 20     , 40
union all select 1002       ,'ac'     , 20    , 30     , 50
union all select 1003       ,'bc'     , 20    , 30     , 80
union all select 1004      , 'ad'     , 10    , 20    , 30
union all select 1004      , 'ad'     , 20    , 20     , 40
select a.* from @t a,(select a,b from @t group by a,b having count(*)>1) b where a.a=b.a and a.b=b.b