how can i add a subpartition [message #519776] |
Tue, 16 August 2011 20:11 |
andy huang
Messages: 498 Registered: July 2011
|
Senior Member |
|
|
Dear all,
I have created a partition table using template,how can i add a subpartition named p_default which store default values for all pattitions ?
create table tb_p_test
(
RECDATE NUMBER(8) not null,
USERNUMBER VARCHAR2(32) not null,
PROVCODE NUMBER(5) default 0 not null,
count number
)
partition by range (RECDATE) subpartition by list(PROVCODE)
subpartition template (
subpartition p_00 values (0) ,
subpartition p_01 values (1) ,
subpartition p_02 values (2) ,
Subpartition p_null Values(Null)
)
(
partition p_20110801 values less than (20110802),
partition p_20110802 values less than (20110803)
);
|
|
|
|
Re: how can i add a subpartition [message #520015 is a reply to message #519777] |
Thu, 18 August 2011 03:44 |
andy huang
Messages: 498 Registered: July 2011
|
Senior Member |
|
|
hi,
The issue have sloved. The flowing sql can do it.
Alter Table TB_HXL_USER Set Subpartition Template
(
subpartition p_00 values (0) ,
subpartition p_01 values (1) ,
subpartition p_02 values (2) ,
Subpartition p_null Values(Null),
Subpartition p_default Values(default)
)
|
|
|