+ 5
Which query would you use to display duplicate records into the table ? 😇 😇
Comment your mind answer 😇
7 Respuestas
+ 6
display it..
+ 3
i think something like this should work:
SELECT a.*, b.totalCount AS Duplicate FROM tablename a
INNER JOIN
(
SELECT email, COUNT(*) totalCount
FROM tableName
GROUP BY email
) b ON a.email = b.email
WHERE b.totalCount >= 2
+ 2
You want to get rid of duplicates? Or find them and display them?
+ 2
you could make a condition with COUNT()
+ 2
maybe like this? select * from employee where count(id)>1
0
Use max rowid with group by columns....