---
title: "mysql删除多字段重复的数据"
author: "loveofgod"
date: "2011-11-03T17:54:21Z"
tags: []
categories: ["数据库"]
slug: "mysql"
draft: false
lastmod: "2011-11-03T18:13:40Z"
id: 1233689
url: "https://akalius.iteye.com/blog/1233689"
---

create table tmp as select min(id) as col1 from blur_article group by title;
delete from blur_article where id not in (select col1 from tmp); 
drop table tmp;


create table tmp as select min(id) as col1 from followers group by user_id,follower_id;

delete from followers where id not in (select col1 from tmp);