发布网友 发布时间:2022-04-08 10:48
共2个回答
懂视网 时间:2022-04-08 15:09
select * from Persons where Id in ( SELECT MAX(Id) AS Expr1 FROM Persons GROUP BY Name, Gender )
2.删除重复的数据【MAX换成MIN会有不同的效果】
delete from Persons where Id not in ( SELECT MAX(Id) AS Expr1 FROM Persons GROUP BY Name, Gender )
MSSQL取得或删除重复数据
标签:
热心网友 时间:2022-04-08 12:17
SQL重复数据的提取与过滤