Oracle查询重复数据取第二行,好用来删除重复数据
SELECT * FROM (
SELECT e.* ,
ROW_NUMBER() over(PARTITION BY product_category_id,model_size_id ORDER BY product_category_id,model_size_id) rn
FROM equ_check_rules e ) s WHERE rn = 2;
Oracle查询重复数据取第二行,好用来删除重复数据
SELECT * FROM (
SELECT e.* ,
ROW_NUMBER() over(PARTITION BY product_category_id,model_size_id ORDER BY product_category_id,model_size_id) rn
FROM equ_check_rules e ) s WHERE rn = 2;