Example - AUTOMATIC LIST PARTITION v13
The following example shows a (sales)
table that uses an AUTOMATIC
clause to create an automatic list partitioned table on the sales_state
column. The database creates a new partition and adds data to a table.
Query the ALL_TAB_PARTITIONS
view to see an existing partition that is successfully created.
Now, insert data into a sales
table that cannot fit into an existing partition. For the regular list partitioned table, you will encounter an error but automatic list partitioning creates and inserts the data into a new partition.
Then, query the ALL_TAB_PARTITIONS
view again after the insert. The partition is automatically created and data is inserted to hold a new value. A system-generated name of the partition is created that varies for each session.