Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

mySQL - remove duplicate rows

Name: Anonymous 2012-11-20 11:17

hi, Iam writing a python script that gets articles from a MySQL DB, splits the article in its words, gets all synonyms for that word and saves it back to the MySQL server.
the problem now is that there are duplicate synonyms for each article.

Iam using three tables:
articles with aID, article
synonyms with sID, synonym
and a correlation table corr with aID, sID

anyone got an idea how to remove duplicates from the tables synonyms and corr or a tip how to avoid this?

Name: Anonymous 2012-11-20 11:29

try a ranked query and row_number to pick a duplicate to keep, then to avoid it you could use an unique index, but why am i helping you with this?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List