Example: PARTITION BY LIST v16
This 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 evaluates the following statement against the partitioning rules and stores the row in the europe
partition:
INSERT INTO sales VALUES (10, '9519a', 'FRANCE', '18-Aug-2012', '650000');