I have a python script that inserts rows into a table. I want it to either delete duplicate rows or ignore the INSERT if the row exists. What I have tried so far:
#delete duplicate entries
c.execute('''DELETE FROM server WHERE sites NOT IN
(SELECT MIN(sites) sites FROM server GROUP BY sites)''')
The table "server" is a single column "sites". This is a table of web sites. It's not throwing any errors. It's just doesn't not deleting the duplicates.