delete from 表名称 where rownum<=1000;
1: 简单的 top方式
delete from 表 where id in(select top 3 id from 表)
2:rank排名函数
根据某些业务条件,使用排名函数获得排名靠前的值,再使用删除操作
deletefrom 表 where id in(
select id from(
SELECT id ,RANK() OVER (PARTITION BY i. i.Quantity DESC) AS Rank
FROM表
) where rank<=3
)