Suppose multiple column with 1000 records in a table, how to find the duplicate record in whole table?
Please help.
Suppose multiple column with 1000 records in a table, how to find the duplicate record in whole table?
Please help.
Duplicated id's:
select s.id, t.*
from [stuff] s
join (
select name, city, count(*) as qty
from [stuff]
group by name, city
having count(*) > 1
) t on s.name = t.name and s.city = t.city
answer is also posted in this topic: How do I find duplicates across multiple columns?