标签:
1,删除数据库中重复的用户名
delete a from user as a, (select min(id) id,name from user group by name ) as b where a.name = b.name and a.id <> b.id;
group by 取出最小的id,然后从表中删除重复数据;
group by name [ having count(id) >1 ]
标签:
原文地址:http://my.oschina.net/u/856051/blog/478196