declare v_date date; v_part_name varchar(50); begin v_date := date'2015-2-4'; while v_date >= date'2014-10-20' LOOP v_part_name := 'LOG_' || to_char(v_date,'yyyymmdd'); dbms_output.put_line(v_part_name); execute immediate 'ALTER TABLE table_log DROP PARTITION ' || v_part_name; v_date := v_date -1; END LOOP; end;