I am using mysql and I have a table called "users". how will i get it to show only rows that have duplicate emails in the "email" field. I want the emails in order. what sql query will I use?
welbyobeng
3
Junior Poster in Training
Recommended Answers
Jump to PostSELECT email, COUNT(email) AS NumOccurrences FROM users GROUP BY email HAVING ( COUNT(email) > 1 )
All 4 Replies
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
welbyobeng
3
Junior Poster in Training
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
welbyobeng
3
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.