Example - PARTITION BY LIST v12
The following example creates a partitioned table (sales)
using the PARTITION BY LIST
clause. The sales
table stores information in three partitions (europe, asia
, and americas
).
The resulting table is partitioned by the value specified in the country
column.
- Rows with a value of
FRANCE
orITALY
in thecountry
column are stored in theeurope
partition. - Rows with a value of
INDIA
orPAKISTAN
in thecountry
column are stored in theasia
partition. - Rows with a value of
US
orCANADA
in thecountry
column are stored in theamericas
partition.
The server would evaluate the following statement against the partitioning rules, and store the row in the europe
partition.
INSERT INTO sales VALUES (10, '9519a', 'FRANCE', '18-Aug-2012', '650000');