select distinct *  into #Temp from RepeatAll
drop table RepeatAll
select * into RepeatAll from #Temp
drop table #Temp

select identity(int,1,1) id,* into #Temp from RepeatAll
drop table RepeatAll
--select
select name,sex,address from #Temp group by name,sex,address having (count(*)>1)
--delete
delete from #Temp where id not in
(select min(id) id from #Temp group by name,sex,address)
select name,sex,address into RepeatAll from #Temp
drop table #Temp

相关文章:

  • 2022-01-24
猜你喜欢
  • 2022-12-23
  • 2022-01-06
  • 2021-09-09
  • 2021-11-24
相关资源
相似解决方案