Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Locating Duplicates

Status
Not open for further replies.

M2E

IS-IT--Management
Aug 1, 2005
28
0
0
GB
What is the quickest/easiest way to extract duplicate information from a database?

I have a database which consists of users details including email addresses. Some email addresses are repeated, so now I want to search for these and then delete the duplicate?

Is there way to do this through the phpmyadmin/mysql control panel - or what query would i need to use?

Thanks in advance...

----Ment2Excel (M2E)----
--LEARN BY EXAMPLE--
 
Code:
delete 
  from yourtable
 where primarykey not in
       ( select min(primarykey) 
           from yourtable
         group by email )




r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top