This example creates a partitioned table sales that's first partitioned by the transaction date. The range partitions q1_2012, q2_2012, q3_2012 and q4_2012 are then list subpartitioned using the value of the country column.
This statement creates a table with four partitions. Each partition has three subpartitions.
When a row is added to this table, the value in the date column is compared to the values specified in the range-partitioning rules. The server selects the partition for the row to reside in. The value in the country column is then compared to the values specified in the list subpartitioning rules. When the server locates a match for the value, the row is stored in the corresponding subpartition.
Any row added to the table is stored in a subpartition, so the partitions contain no data.
The server evaluates the following statement against the partitioning and subpartitioning rules. It stores the row in the q3_europe partition.
INSERT INTO sales VALUES (10, '9519a', 'FRANCE', '18-Aug-2012', '650000');