Skip to content
Advertisement

Removing near identical values from mysql table

Is there a way of removing near identical values from a table in mysql? My table has records more than 10K out of which one of the company looks like this:

on using describe tablename I get this:

the names of the company are same however I would like to delete the second instance from table, thereby keeping just a single instance of the name in the table. This is just one instance and there are others like these.. Is there a swift way of removing identical values from the column? Please help.

Advertisement

Answer

You could try using soundex to find the “near identical” values –

You will need to test it with some of your example “near identical” values to see what it does and does not work for. As suggested by Akina you will probably need to go for some kind of normalisation process (stored function) or the Levenshtein distance function linked by Slava.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement