DELETE FROM UserInfo
WHERE (UserName IN
(SELECT UserName
FROM Baidu_TieBa..UserInfo
GROUP BY UserName
HAVING COUNT(UserName) > 1)) AND (id NOT IN
(SELECT MIN(id)
FROM UserInfo
GROUP BY UserName
HAVING (COUNT(UserName) > 1)))
posted on 2016-03-29 14:17
聂文龙 阅读(112)
评论(0) 编辑 收藏 引用