Remove duplicate rows from table
declare cursor c1 is select distinct PRODUCT_SKU, FIT_ID from geo_florist order by PRODUCT_SKU, FIT_ID; begin for cur1 in c1 loop delete from geo_florist a where a.rowid != ( select max(b.rowid) from geo_florist b where a.product_sku = b.product_sku and a.fit_id = b.fit_id) and a.product_sku = cur1.product_sku and a.fit_id = cur1.fit_id; if (mod(c1%rowcount, 1000) = 0) then…