mysql数据库迁移到oracle数据库后 如何删除相同的数据

mysql数据库迁移到oracle数据库后 如何删除相同的数据

首先搞清楚有多少数据是重复的

select pid from product group by pid having count(pid) > 1

删除重复记录(id都是重复的)

delete from product
where
pid not in (select min(pid) from product group by pid having count(pid)>1)

posted @ 2018-08-21 15:53  Advancing-Swift  阅读(475)  评论(1编辑  收藏  举报