删除表中多余重复记录并且只留1条:

DELETE FROM sys_user WHERE id NOT IN ( SELECT dt.minno FROM (
SELECT MIN(id) AS minno FROM sys_user GROUP BY openid ) dt ) and openid is not Null

posted @ 2022-07-15 10:16  末郁  阅读(94)  评论(0编辑  收藏  举报