📜  mysql 删除除一之外的重复行 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:17.089000             🧑  作者: Mango

代码示例1
DELETE FROM NAMES
 WHERE id NOT IN (SELECT * 
                    FROM (SELECT MIN(n.id)
                            FROM NAMES n
                        GROUP BY n.name) x)