Reputation: 9293
I need to delete only unique values from a table. Something like:
delete from clients where title is unique
How to do this?
Upvotes: 0
Views: 59
Reputation: 133360
You could try using a join with th count for title having count = 1
delete c
from clients c
inner join (
select title
from clients
group by title
having count(*) = 1
) t on t.title = c.title
Upvotes: 3