It\'s easy to find duplicates with one field:
SELECT name, COUNT(email) FROM users GROUP BY email HAVING COUNT(email) > 1
So if we have
By Using CTE also we can find duplicate value like this
with MyCTE as ( select Name,EmailId,ROW_NUMBER() over(PARTITION BY EmailId order by id) as Duplicate from [Employees] ) select * from MyCTE where Duplicate>1