oracle:查重,并且根据条件去掉一个重复的数据
查重:
select no from table_name group by no having count(no)>1;
删除重复数据中id较大的数据:
delete from table_name
where no in (select no from table_name group by no having count(no)>1) and id not in (select min(id) from table_name group by no having count(no)>1)

浙公网安备 33010602011771号