Partition maintenance operations include:
Add Partition
Delete Partition
Partition Truncation
Merge partitions
Shard
1. Add a partition-Add a new partition after the last partition
- ALTER TABLESALESADDPARTITION P4VALUESLess than (4000 );
2. delete a partition-delete a specified partition and delete the data in the partition.
- ALTER TABLESALESDROPPARTITION P4;
3. Partition truncation-delete all records in a specified partition
- ALTER TABLESALESTRUNCATEPARTITION P3;
4. merge partitions-connect two adjacent partitions of a range partition or a composite partition.
- ALTER TABLESales merge partitions S1, S2INTOPARTITION S2;
5. Split partitions-split records in a large partition into two partitions
- ALTER TABLESales split partition P2AT(1500)INTO(PARTITION p21. PARTITION P22 );
6. query and delete a table partition:
- SELECT*FROMSALES3 PARTITION (P3 );
- DELETE FROMSALES3 PARTITION (P2 );
For more information about Oracle, see Oracle topics page http://www.bkjia.com/topicnews.aspx? Tid = 12