create table t (
c1 int
) partition by range ( c1 ) (
partition p1 values less than ( 9 ),
partition p2 values less than ( 99 )
);
alter table t
add partition p3 values less than ( 0 );
ORA-14074: partition bound must collate higher than that of the last partition
with rws as (
select table_name, partition_position, high_value,
row_number () over (
partition by table_name
order by partition_position desc
) rn
from user_tab_partitions
)
select table_name, high_value
from rws
where rn = 1;
TABLE_NAME HIGH_VALUE
---------- ----------
T 99
1条答案
按热度按时间cl25kdpy1#
您要添加的分区的限制值低于表中已有的最高限制:
0〈99 =〉您无法添加分区。如果您希望分区具有此上限,则需要拆分现有分区。
您可以通过查询
*tab_partitions
并获取具有最大partition_position
的分区的high_value
来查找当前最大值