Oracle Table Partitioning: manipulating Partitioned Tables

Source: Internet
Author: User

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

  1. ALTER TABLESALESADDPARTITION P4VALUESLess than (4000 );

2. delete a partition-delete a specified partition and delete the data in the partition.

  1. ALTER TABLESALESDROPPARTITION P4;

3. Partition truncation-delete all records in a specified partition

  1. ALTER TABLESALESTRUNCATEPARTITION P3;
4. merge partitions-connect two adjacent partitions of a range partition or a composite partition.
  1. ALTER TABLESales merge partitions S1, S2INTOPARTITION S2;
5. Split partitions-split records in a large partition into two partitions
  1. ALTER TABLESales split partition P2AT(1500)INTO(PARTITION p21. PARTITION P22 );

6. query and delete a table partition:

  1. SELECT*FROMSALES3 PARTITION (P3 );
  2. DELETE FROMSALES3 PARTITION (P2 );

For more information about Oracle, see Oracle topics page http://www.bkjia.com/topicnews.aspx? Tid = 12

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.