mysql删除某个字段重复的数据

来源:互联网 发布:淘宝网店怎么收藏 编辑:程序博客网 时间:2024/04/30 23:57

做个笔记

DELETE FROM tablename where id not in (select id from (select min(id) as id from tablename group by key) as b ) ;

其中key是重复的字段

0 0
原创粉丝点击