这里最新数据按时间
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;
原创文章,作者:3628473679,如若转载,请注明出处:https://blog.ytso.com/277342.html