select * from [wx].[dbo].[BB_XMGL_t_def] as emp
where (select count(*) from [wx].[dbo].[BB_XMGL_t_def] e where e.USER_ID=emp.USER_ID and e.BB_XMGL_id=emp.BB_XMGL_id)>1
原始
select * from emp
where (select count(*) from emp e where e.name=emp.name) >1