mysql去除重复保留最新一条记录代码
delete from ol_news
where title in ( select title from (
select title from ol_news group by title having count(ID) > 1
) as TAB1 )
and ID not in (
select ID from (
select min(ID) as ID from ol_news group by title having count(ID) > 1
) as TAB2
)