Home > database >  SQL database like this kind of circumstance how to remove duplicate data left a great god
SQL database like this kind of circumstance how to remove duplicate data left a great god

Time:10-03

CodePudding user response:

; WITH cte AS (
Select *, ROW_NUMBER () OVER (PARTITION BY repeating field 1, 2 ORDER BY repeating field GETDATE ()) rn from table
)
The DELETE FROM cte WHERE rn<> 1
  • Related