Oracle table partition, oracle Partition

Source: Internet
Author: User

Oracle table partition, oracle Partition

The partition of the pivoel table can basically be divided into several categories:
-Range Partition
-Hash Partition
-List partitions
-Combined partitions: Range-Hash and Range-List.

1. Create a partition table using Range partitions
CREATE TABLE TABLE_PARTITION(         COL1   NUMBER,         COL2   VARCHAR2(100)  )  partition by range(COL1)(            partition TAB_PARTOTION_01 values less than (450000),            partition TAB_PARTOTION_02 values less than (900000),            partition TAB_PARTOTION_03 values less than (1350000),            partition TAB_PARTOTION_04 values less than (1800000),            partition TAB_PARTOTION_OTHER values less THAN (MAXVALUE)  ); 
Insert Test Data
Insert into TABLE_PARTITION (COL1, COL2) VALUES (1, 'Data test'); insert into TABLE_PARTITION (COL1, COL2) VALUES (23, 'Data test '); insert into TABLE_PARTITION (COL1, COL2) VALUES (449000, 'Data test'); insert into TABLE_PARTITION (COL1, COL2) VALUES (450000, 'Data test '); insert into TABLE_PARTITION (COL1, COL2) VALUES (1350000, 'Data test'); insert into TABLE_PARTITION (COL1, COL2) VALUES (900000, 'Data test '); insert into TABLE_PARTITION (COL1, COL2) VALUES (1800000-1, 'Data test'); COMMIT;
View data in a partition
SELECT * FROM TABLE_PARTITION partition(TAB_PARTOTION_02); 

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Related Article

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.