mysql刪除重複數據sql

DELETE a from nature_product a JOIN ( select count(*) as count,custom_code,MIN(id) as id from nature_product GROUP BY custom_code HAVING count >1 ) b on a.custom_code = b.custom_code and a.id > b.i
相關文章
相關標籤/搜索