Monday, September 6, 2010

How to find duplicate records in a table ?

select * from emp

group by (empid)

having count(empid)>1




--------------------------------------------------------------------------------

select * from emp where EmpID in(select EmpID
from emp
group by EmpID having count(EmpID)>1)

No comments:

Post a Comment

 using Microsoft.AspNetCore.Mvc; using System.Xml.Linq; using System.Xml.XPath; //<table class="common-table medium js-table js-stre...