alter table...partition syntax

The syntax for using the partition clause to alter table is:

alter table table_name partition n

where table_name is the name of the table and n is the number of partitions you are creating.

Any data that is in the table before you invoke alter table remains in the first partition. Partitioning a table does not move the table’s data – it will still occupy the same space on the physical devices.

If you are creating partitioned tables for parallel queries, you may need to redistribute the data, either by creating a clustered index or by copying the data out, truncating the table, and then copying the data back in.

You cannot include the alter table...partition command in a user-defined transaction.

The following command creates 10 partitions for a table named historytab:

alter table historytab partition 10