Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

tsql remove duplicate rows

DELETE T
FROM
(
SELECT *
, DupRank = ROW_NUMBER() OVER (
              PARTITION BY key_value
              ORDER BY (SELECT NULL)
            )
FROM original_table
) AS T
WHERE DupRank > 1
Source by learn.microsoft.com #
 
PREVIOUS NEXT
Tagged: #tsql #remove #duplicate #rows
ADD COMMENT
Topic
Name
8+7 =