本文為您介紹遷移 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));