Remove duplicate rows in a table

前端 未结 3 1188
日久生厌
日久生厌 2020-12-11 13:21

I have a table contains order information like below:

Order table:

As we can see from that table, each order_no has several duplicates. So

3条回答
  •  无人及你
    2020-12-11 13:29

    This should work, even in your ancient and outdated Oracle version:

    delete from order_table
    where rowid not in  (select min(rowid)
                         from order_table
                         group by order_no);
    

提交回复
热议问题