这里最新数据按时间
delete from tb_mb_stock_quantity where pk in(
SELECT T.pk
FROM (SELECT A.*,ROW_NUMBER() OVER(PARTITION BY 需要分组的字段 ORDER BY 时间字段 DESC) RW
FROM 表 A
) T
WHERE T.RW > 1
);
commit;
标签:RW,删除,OVER,最新,时间,一笔,oracle,pk,SELECT
来源: https://www.cnblogs.com/UsefulIdiot/p/16525044.html