select a.* from person a
right join (select PersonName,PersonDept from person group by PersonName,PersonDept having count(*)>1)b
on a.PersonName=b.PersonName and a.PersonDept=b.PersonDept
create table aa (PersonName varchar(20), PersonDept varchar(20), PersonType varchar(20))
insert into aa
select '李四','财务','11'union all
select '李三','采购','12'union all
select '李四','财务','13'union all
select '李五','财务','14'union all
select '李一','采购','15'union all
select '李三','采购','16'
select 别名,count(别名) 重复个数 from
(select (rtrim(PersonName)+rtrim(PersonDept)) as 别名 from aa) t group by 别名 having count(别名)>1