In the previous article, from the beginning we have created a new Automatic List partitioning table, now in this article, we are going to change existing non partitioned table to automatic List-partitioning table:
Create a non partitioned table:
create table automatic_List_Partitioned (
id integer,
state varchar2(20)
);
Insert some data:
insert into automatic_List_Partitioned values (1,'Sidi Bouzid');
insert into automatic_List_Partitioned values (2,'Hania');
Modify the table to Automatic List-Partitionned table:
Specification of new partition
First partition: p_tunis: with the value “TUNIS”
alter table automatic_List_Partitioned modify partition by list (state) automatic
(
PARTITION p_tunis values ('TUNIS')
);
Enjoy !