the answer by @Molochdaa which is accepted is wrong
Explanation.
suppose this is the table
col_name | value
------------------
east | 10
west | 15
east | 10
west | 15
north | 5
east | 10
north | 5
select distinct col_name from table_name gives:
col_name
------------------
east
west
north
now when you write delete from table where col_name not in ( ... )
then no row will be returned as every column is in the returned list
The correct answer would be (suggested by @jeffery_the_wind)
delete from table where col_name in (
select a.col_name from (
select col_name from table group by col_name having count(*)>1
) a
)
Another answer which is more simple
delete from table_name
where rowid not in ( select min(rowid)
from Table_name
group by column1..,column2,...column3..)