maomingchao

oracle 数据库去重复数据

delete from 表名 a where rowid !=(select max(rowid) from 表名 b where a.ORDER_ID=b.ORDER_ID)

 

例:如果重复的数据表是:test_table

delete from test_table a where rowid !=(select max(rowid) from test_table b where a.ORDER_ID=b.ORDER_ID)

posted on 2018-05-07 21:27  maomingchao  阅读(1442)  评论(0编辑  收藏  举报

导航