【Vegas原创】用虚拟表删除多条重复数据
原创
©著作权归作者所有:来自51CTO博客作者李济宏Amadeus的原创作品,请联系作者获取转载授权,否则将追究法律责任
select * into #tmp from trvperson
group by id,parentID,tableName,url,target,expanded
having count(id)>1
delete trvperson where id in(select id from #tmp)
insert into trvperson
select * from #tmp
drop table #tmp