Sqlserver
 sql >> Datenbank >  >> RDS >> Sqlserver

Wie lösche ich doppelte Daten aus der SQL-Tabelle

;with cte as(
select State City, SubDiv, Pincode, Locality, Lat, Long, 
row_number() over (partition by City, SubDiv, Pincode, Locality, Lat,Long order by City) rn
from yourtable
)
delete cte where rn > 1