标签:16px having group by name join style rom test from
select name,sex,count(*) from test group by name,sex HAVING count(*)>1。
delete a from test a join
(select name,sex,count(*) ,max(id) as id
from test group by name,sex
HAVING count(*)>1) b on a.name=b.name where a.id<b.id
标签:16px having group by name join style rom test from
原文地址:http://www.cnblogs.com/coder9527/p/6556915.html