DELETE T
FROM
(
SELECT *
, DupRank = ROW_NUMBER() OVER (
              PARTITION BY ID
              ORDER BY (SELECT NULL)
            )
FROM Table1
) AS T
WHERE DupRank > 1 

说明:Table1 为要删除表结构,ID为重复的数据

  

posted on 2024-03-14 11:55  我的梦想是开个小店  阅读(4)  评论(0编辑  收藏  举报