gpt4 book ai didi

oracle - 在 SUBPARTITION 中使用 INTERVAL (NUMTOYMINTERVAL (1 ,'MONTH')

转载 作者:行者123 更新时间:2023-12-01 10:45:32 26 4
gpt4 key购买 nike

我正在尝试将分区添加到我创建的表中。我希望它按“PARTITION GRP”分区并按月进行分区。但我不知道如何在子分区内编写 INTERVAL 子句。有人可以帮我吗?谢谢!

PARTITION BY RANGE (PARTITION_GRP)
SUBPARTITION BY RANGE (RPTG_MTH_DATE)
INTERVAL(NUMTOYMINTERVAL(1,'MONTH'))
(
PARTITION PG_0 VALUES LESS THAN (1)
(SUBPARTITION PG_0_201401 VALUES LESS THAN (TO_DATE('1-FEB-2014', 'DD-MON-YYYY'))),
PARTITION PG_1 VALUES LESS THAN (2)
(SUBPARTITION PG_1_201401 VALUES LESS THAN (TO_DATE('1-FEB-2014', 'DD-MON-YYYY'))),
PARTITION PG_2 VALUES LESS THAN (3)
(SUBPARTITION PG_2_201401 VALUES LESS THAN (TO_DATE('1-FEB-2014', 'DD-MON-YYYY'))),
PARTITION PG_3 VALUES LESS THAN (4)
(SUBPARTITION PG_3_201401 VALUES LESS THAN (TO_DATE('1-FEB-2014', 'DD-MON-YYYY'))),
PARTITION PG_4 VALUES LESS THAN (MAXVALUE)
(SUBPARTITION PG_4_201401 VALUES LESS THAN (TO_DATE('1-FEB-2014', 'DD-MON-YYYY')))
)

最佳答案

来自 the documentation :

Restrictions on Interval Partitioning
The INTERVAL clause is subject to the following restrictions:

  • You can specify only one partitioning key column, and it must be of NUMBER or DATE type.
  • This clause is not supported for index-organized tables.
  • You cannot create a domain index on an interval-partitioned table.
  • Interval partitioning is not supported at the subpartition level. ...

所以你不能有间隔子分区。

关于oracle - 在 SUBPARTITION 中使用 INTERVAL (NUMTOYMINTERVAL (1 ,'MONTH'),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26808000/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com