Database Reference
In-Depth Information
AS SELECT * FROM SALES;
Figure 18.15
CREATE TABLE
Syntax for Hash
Partitions.
18.3.6.2.4
CREATE TABLE Range-Hash Partition Syntax
This time we have a simple example but of a range-hash partition or a set of
hash subpartitions contained within each range partition, created as a sub-
query from the SALES table. (See Figure 18.16 for a diagram of the syntax.)
CREATE TABLE SALESRANGEHASH
PARTITION BY RANGE(SALE_DATE)
SUBPARTITION BY HASH(CONTINENT_ID)
(PARTITION S2001 VALUES LESS THAN
(TO_DATE('2002-01-01','YYYY-MM-DD'))
, PARTITION S2002 VALUES LESS THAN
(TO_DATE('2003-01-01','YYYY-MM-DD'))
, PARTITION S2003 VALUES LESS THAN(MAXVALUE))
AS SELECT * FROM SALES;
18.3.6.2.5
CREATE TABLE Range-List Partition Syntax
Finally, the following is an example of a range-list partition or a set of list
subpartitions contained within each range partition, as with all the others,
created as a subquery from the SALES table. (See Figure 18.17 for a dia-
gram of the syntax.)
CREATE TABLE SALESRANGELIST
PARTITION BY RANGE(SALE_DATE) SUBPARTITION BY
LIST(CONTINENT_ID) (
PARTITION S2001 VALUES LESS THAN (TO_DATE('2002-01-
01','YYYY-MM-DD'))
(SUBPARTITION S2001EuropeAndAmerica VALUES (1,2,3,4)
 
Search WWH ::




Custom Search