从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

浙公网安备 33010602011771号