Oracle Table Partitioning

Source: Internet
Author: User

/*create TABLE Chukou

(

CAR_ID Number (Ten) is not NULL,

Car_date DATE,

Car_busnumber number

)

PARTITION by RANGE (car_date)

(

PARTITION Chukou_par01 VALUES Less THAN (to_date (' 17-11-2014 ', ' dd-mm-yyyy ') tablespace etltest_data,

PARTITION Chukou_par02 VALUES Less THAN (to_date (' 18-11-2014 ', ' dd-mm-yyyy ') tablespace etltest_data,

)


*/


--How many partitions on the query table SELECT * from user_tab_partitions WHERE table_name= ' Chukou '

--Add Table Partition ALTER table Chukou ADD PARTITION chukou_par03 VALUES less THAN (to_date (' 19-11-2014 ', ' dd-mm-yyyy '));


--Data maximum partition (used when several other partitions are undefined) ALTER TABLE chukou ADD PARTITION Part_max values less than (MaxValue);


--TRUNCATE partition reclaim space ALTER TABLE Chukou TRUNCATE PARTITION chukou_par02;


--Directly using DOP statement to delete and reclaim table Space ALTER table Chukou DROP PARTITION Chukou_par01;


Oracle Table Partitioning

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.