This article introduces you to the supported conversion scope of the CREATE TABLE DDL secondary template partition when migrating data from an Oracle database to OceanBase Database's Oracle compatible mode.
Syntax of 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
Defining subpartition templates by using the SUBPARTITION TEMPLATE keywords is supported. The syntax in the template is the same as that of user-defined partitions. For more information, see User-defined partitions. Example:
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', 'NLS_DATE_LANGUAGE=AMERICAN')),
PARTITION SALES_Q3_1999 VALUES LESS THAN (TO_DATE('01-OCT-1999','DD-MON-YYYY', 'NLS_DATE_LANGUAGE=AMERICAN')),
PARTITION SALES_Q2_2000 VALUES LESS THAN (TO_DATE('01-JUL-2000','DD-MON-YYYY', 'NLS_DATE_LANGUAGE=AMERICAN')),
PARTITION SALES_Q3_2000 VALUES LESS THAN (TO_DATE('01-OCT-2000','DD-MON-YYYY', 'NLS_DATE_LANGUAGE=AMERICAN')),
PARTITION SALES_Q4_2000 VALUES LESS THAN (MAXVALUE)
);