DELETE FROM student
WHERE id
in (
SELECT
a.id as id
FROM
(
SELECT
s2.id as id
FROM
student s1 ,student s2
WHERE
s1.`name` = s2.`name`
AND s1.age = s2.age
AND s1.id < s2.id
) AS a
)
3-删除多余的相同的数据,保留ID最小的数据
最新推荐文章于 2021-07-04 08:25:45 发布