mysql删除重复的数据,兵留最小一条数据

DELETE 
FROM v5_shops WHERE id NOT IN ( SELECT t.id
    FROM ( SELECT MIN(id) AS id FROM v5_shops  GROUP BY `shop_no` ) t
)

 

posted @ 2022-11-15 19:37  Abner3721  阅读(18)  评论(0编辑  收藏  举报