删除数据库重复记录

delete from Userinfo
   where userid  in (select  userid  from  Userinfo
   group  by  userid   having  count(userid) > 1)
and uid not in (select min(uid) from  Userinfo
   group by userid  having count(userid )>1)
posted @ 2011-03-14 11:30  放哨De老鼠  阅读(310)  评论(0编辑  收藏  举报