oracle删除重复数 1 2 3 4 5 6 --查询出所有有重复的数据 select s.year,s.oneday,count(*) from SYS_CALENDAR s group by s.year,s.oneday having count(*)>1 order by s.year,s.oneday; 1 2 3 4 5 6 7 8 9 10 --删除重复数据 delete from SYS_CALENDAR a where (a.year, a.oneday) in (select s.year, s.oneday from SYS_CALENDAR s group by s.year, s.oneday having count(*) > 1) and rowid not in (select min(rowid) from SYS_CALENDAR group by year, oneday having count(*) > 1); 学如逆水行舟,不进则退