文档

二级分区模板

更新时间:

本文为您介绍迁移 Oracle 数据库的数据至 OceanBase 数据库 Oracle 租户时,CREATE TABLE DDL 二级模板分区的支持转换范围。

二级分区模板 subpartition_template 定义如下:

SUBPARTITION TEMPLATE
  ( { range_subpartition_desc [, range_subpartition_desc] ...
    | list_subpartition_desc [, list_subpartition_desc] ...
    | individual_hash_subparts [, individual_hash_subparts] ...
    }
  ) | hash_subpartition_quantity

支持以 SUBPARTITION TEMPLATE 关键字定义二级分区模板,模板中的语法与自定义分区一致。详情请参见 自定义分区。示例如下:

CREATE TABLE 
T (C1 DATE, C2 NUMBER)PARTITION BY RANGE (C1) SUBPARTITION BY RANGE (C2)
SUBPARTITION TEMPLATE 
(SUBPARTITION SP_TEMP VALUES LESS THAN (999))
(PARTITION SALES_Q1_1998 VALUES LESS THAN (TO_DATE('01-APR-1998','DD-MON-YYYY')),
 PARTITION SALES_Q3_1999 VALUES LESS THAN (TO_DATE('01-OCT-1999','DD-MON-YYYY')),
 PARTITION SALES_Q2_2000 VALUES LESS THAN (TO_DATE('01-JUL-2000','DD-MON-YYYY')),
 PARTITION SALES_Q3_2000 VALUES LESS THAN (TO_DATE('01-OCT-2000','DD-MON-YYYY')),
 PARTITION SALES_Q4_2000 VALUES LESS THAN (MAXVALUE));
  • 本页导读 (0)