码迷,mamicode.com
首页 > 数据库 > 详细

SQL 去重

时间:2014-05-04 17:36:38      阅读:314      评论:0      收藏:0      [点我收藏+]

标签:having   count   where   

delete from testtable a where (a.testcontent) in (select testcontent from testtable GROUP BY testcontent having count(*)>1) and seqid not in (select min(seqid) from testtable group by testcontent having count(*)>1)

SQL 去重,布布扣,bubuko.com

SQL 去重

标签:having   count   where   

原文地址:http://smilezhuolin.blog.51cto.com/7671611/1405987

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!