mysql刪除同表重複記錄保存id最小的記錄

-- mysql刪除同表重複記錄保存id最小的記錄
delete from team where id in(
select a.id from(
select * from team where id not in 
(select id from team group by n HAVING 1=1 order by id)
) a
)



發佈了38 篇原創文章 · 獲贊 17 · 訪問量 17萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章