Connor and Chris will both be at AI World from October 12 to October 17 , the premier Oracle conference of 2025. If you're in Vegas, please come say Hi or pop into our sessions
Thanks for the question, Yam.
Asked: August 12, 2019 - 11:08 am UTC
Last updated: December 12, 2022 - 3:28 am UTC
Version: 12.1
Viewed 10K+ times! This question is
create table t ( c1 ) partition by range ( c1 ) interval ( 2 ) ( partition p0 values less than ( 1 ) ) as select level c1 from dual connect by level <= 10; select partition_name, high_value from user_tab_partitions where table_name = 'T' and partition_position = 1; PARTITION_NAME HIGH_VALUE P0 1 alter table t drop partition p0; select partition_name, high_value from user_tab_partitions where table_name = 'T' and partition_position = 1; PARTITION_NAME HIGH_VALUE SYS_P571 3 alter table t drop partition SYS_P571; select partition_name, high_value from user_tab_partitions where table_name = 'T' and partition_position = 1; PARTITION_NAME HIGH_VALUE SYS_P572 5
Dieter, December 08, 2022 - 9:12 pm UTC
create table t ( c1 ) partition by range ( c1 ) interval ( 2 ) ( partition p0 values less than ( 1 ) ) as select level c1 from dual connect by level <= 10; Table T created. select partition_name, partition_position, high_value , interval from user_tab_partitions where table_name = 'T' and partition_position = 1; PARTITION_NAME PARTITION_POSITION HIGH_VALUE INTERVAL -------------- ------------------ ---------- -------- P0 1 1 NO alter table t drop partition p0; Error report - ORA-14758: Last partition in the range section cannot be dropped 14758. 00000 - "Last partition in the range section cannot be dropped" *Cause: An attempt was made to drop the last range partition of an interval partitioned table. *Action: Do not attempt to drop this partition.
Dieter, December 09, 2022 - 9:06 am UTC
ALTER TABLE T SET INTERVAL (2);
If you are new to partitioning, check out Connor McDonald's introduction series here.
Documentation set on VLDB and Partitioning.