1.在表中(表名:table 主键:id)增加一个字段rownum,类型为serial
2.执行语句:
delete from table where rownum not in(
select max(rownum) from table group by id
)
3.最后删除rownum
1.在表中(表名:table 主键:id)增加一个字段rownum,类型为serial
2.执行语句:
delete from table where rownum not in(
select max(rownum) from table group by id
)
3.最后删除rownum