Jump to content

how can I delete duplicate entries from my database?


dabempire

Recommended Posts

I have a script that is a links directory.  It has quite a few duplicates in the database.  What can I use to delete the duplicates?  Here is the database info.

 

database: links

row: my_links

column with duplicate entries: link

 

I need to run it so that if X exists >1 time to remove all but 1.

 

Thanks a ton for any help.

Link to comment
Share on other sites

first off, you won't have duplicate entries if you have your database normalized enough to meet your needs. And even if with the key, still duplicates exist.... then you can delete it by deleting the entry through an ID.

 

other than that, you can use ag3tn42's suggestion since not a column was unique there in.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.