MSSQL 테이블에서 중복 제거

1551 단어 MSSQL
declare @ids int =1 declare @ count int

while @ids<471

begin

select @ count = COUNT (*) From LotNO where cLotNO=( select cLotNO From LotNO where Auto_ID=@ids)

if @ count >1

begin

delete from LotNO where Auto_ID=@ids

end

select @ids+=1

end

좋은 웹페이지 즐겨찾기