Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

duplicate emails in Oracle DB

Hi - I'm trying to find records in a DB that have identical email addresses in the email address field.
The below SQL finds email addresses that have a count >1 but I want to find all the duplicate addresses and generate a listing of the userIDs and names in order to clean up the DB.

This finds duplicate addresses - how can i modify this to list the names, and email addresses - thanks

SELECT USER_EMAIL_ADDRESS,
COUNT (USER_EMAIL_ADDRESS) AS NumOccurences
FROM USER
GROUP BY USER_EMAIL_ADDRESS
HAVING ( COUNT(USER_EMAIL_ADDRESS) >1 )
Sign In or Register to comment.