查询表中手机号重复的人,并删除
DELETE
FROM
table
WHERE
id IN (
SELECT
a.id
FROM
(
SELECT
id
FROM
table
WHERE
uid = 1
GROUP BY
mobile
HAVING
count(mobile) > 1
) a
);
查询表中手机号重复的人,并删除
DELETE
FROM
table
WHERE
id IN (
SELECT
a.id
FROM
(
SELECT
id
FROM
table
WHERE
uid = 1
GROUP BY
mobile
HAVING
count(mobile) > 1
) a
);