Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: 8i (8.1.5) - Add Partitions to previously Non-Partitioned Table containing data ???
If you want to have a table with only/exactly one partiton then use Jonathans way. But if you then will/must split the one partition in two or more then is an other way better (in my sight - I had tested it). Following
(1) create the n partitions as separate tables
Have a look at the right partition borders!
(2) create the indexes (3) create the statistics (4) create the partitioned table with n empty partitions create table xxx partitioned by range (aaa) ( partition p1 ..., partition p2 ... ) as select * from table where 0=1(5) alter table xxx exchange partition p1 with table ...
-> do this for each partition
Jan
This is the fastest way, if you want to create more then one partition.
Christian Roig wrote:
>
> 8i (8.1.5) - Add Partitions to previously Non-Partitioned Table
> containing data ???
>
> Is it possible to use the Alter Table command to add partitions to a
> table that contains data and was not previously partitioned ???
>
> Or do I have to do a 'Create Table As Select' with Partition creation
> statements ???
>
> I have looked at the Oracle documentation, but I don't thnk that it is
> stated very clearly wether or not it is possible to use the Alter
> Table command to add partitions to a table that contains data and was
> not previously partitioned.
>
> TIA - Christian
--