begin tran 
delete from WxUser_BMUser  
where   OpenId in (  select a.OpenId from WxUser_BMUser a where  IsUnBind=0
group by a.OpenId having COUNT(1)>1
) 
and   id not in (select min(id) from WxUser_BMUser  where IsUnBind=0  group by OpenId     having count(1)>1) 

rollback
commit

 

相关文章:

  • 2021-09-28
  • 2022-12-23
  • 2021-08-29
  • 2021-05-21
  • 2022-01-08
  • 2021-09-28
  • 2022-12-23
猜你喜欢
  • 2021-07-03
  • 2022-02-13
  • 2022-12-23
  • 2021-09-01
相关资源
相似解决方案