DELETE FROM tbname WHERE id IN (
    SELECT id from (
        SELECT id FROM tbname  WHERE oldurl in(
            SELECT oldurl FROM tbname  GROUP BY oldurl HAVING count(oldurl) > 1)
            AND id  not IN(SELECT min(id) FROM tbname  GROUP BY oldurl HAVING count(oldurl) > 1)
    ) as t
);
最后修改:2021 年 06 月 07 日 04 : 14 PM
如果觉得我的文章对你有用,请随意赞赏