Example: AUTOMATIC LIST PARTITION v16
This 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 partition and adds data to a table.
Query the ALL_TAB_PARTITIONS
view to see an existing partition that's successfully created:
Insert data into a sales
table that can't fit into an existing partition. For the regular list partitioned table, you get an error. However, automatic list partitioning creates and inserts the data into a new partition.
Query the ALL_TAB_PARTITIONS
view again after the insert. The partition is created, and data is inserted to hold a new value. A system-generated name of the partition is created that varies for each session.