split partition
drop table salestable;
CREATE TABLE salestable
(s_productid NUMBER,
s_saledate DATE,
s_custid NUMBER,
s_totalprice NUMBER)
PARTITION BY RANGE(s_saledate)
(PARTITION sal99q1 VALUES LESS THAN (TO_DATE('01-APR-1999', 'DD-MON-YYYY')),
PARTITION sal99q2 VALUES LESS THAN (TO_DATE('01-JUL-1999', 'DD-MON-YYYY')),
PARTITION sal99q3 VALUES LESS THAN (TO_DATE('01-OCT-1999', 'DD-MON-YYYY')),
PARTITION sal99q4 VALUES LESS THAN (TO_DATE('01-JAN-2000', 'DD-MON-YYYY')),
PARTITION sal00q1 VALUES LESS THAN (TO_DATE('01-APR-2000', 'DD-MON-YYYY')),
PARTITION sal00q2 VALUES LESS THAN (TO_DATE('01-JUL-2000', 'DD-MON-YYYY')),
PARTITION sal00q3 VALUES LESS THAN (TO_DATE('01-OCT-2000', 'DD-MON-YYYY')),
PARTITION sal00q4 VALUES LESS THAN (TO_DATE('01-JAN-2001', 'DD-MON-YYYY')),
PARTITION sql_max VALUES LESS THAN (maxvalue)
);
ALTER TABLE salestable SPLIT PARTITION sql_max
AT (TO_DATE('01-APR-2001','DD-MON-YYYY'))
INTO (PARTITION sal01q1, PARTITION sql_max);
ALTER TABLE salestable SPLIT PARTITION sql_max
AT (TO_DATE('01-JUL-2001','DD-MON-YYYY'))
INTO (PARTITION sal01q2, PARTITION sql_max);
END.
大肚能容,容世間難容之事;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/271063/viewspace-1056212/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- SPLIT PARTITION 正式指令碼指令碼
- 自動SPLIT ORACLE PARTITIONOracle
- split partition的一些測試
- partition table and partition indexIndex
- PARTITION partition01
- PARTITION partition02
- PARTITION partition04
- Pruning、Reference Partition、Exchange Partition
- partition timestamp(0) not use partition
- JavaScript split()JavaScript
- Awk split
- split 例子
- Edge Split
- PARTITION SPILT
- hive partitionHive
- over (partition by)
- exchange partition
- oracle partitionOracle
- Clique Partition
- git subtree splitGit
- Partition Pruning和Partition-Wise Joins
- Hbase split的三種方式和split的過程
- oracle partition by group by,詳解partition by和group by對比Oracle
- partition table update partition-key result in changing tablespace
- sql shard/partitionSQL
- Partition Pruning
- partition table test
- partition table(1)
- partition table(2)
- exchange partition(轉)
- When to Partition a Table
- 分割槽Partition
- php中split()用法PHP
- Split Array Largest Sum
- split相當好使
- os.path.split
- java split用法 案例Java
- oracle分割槽partition及分割槽索引partition index(一)Oracle索引Index