Floating point, LOB, DataLink, and ROWID columns cannot be used in a partitioning key.
If the clause is not specified, a unique partition name is generated by the database manager.
The starting value of the first data partition is the specified STARTING value. The starting value of each subsequent partition is the starting value of the previous partition + integer-constant. If the starting-clause specified EXCLUSIVE, the starting value of every partition is EXCLUSIVE. Otherwise, the starting value of every partition is INCLUSIVE.
The ending value of every partition of the range is (start + integer-constant - 1). If the ending-clause specified EXCLUSIVE, the ending value of every partition is EXCLUSIVE. Otherwise, the ending value of every partition is INCLUSIVE.
The number of partitions added is determined by adding integer-constant repeatedly to the STARTING value until the ENDING value is reached. For example:
CREATE TABLE FOO (A INT) PARTITION BY RANGE(A) (STARTING(1) ENDING(10) EVERY(2))
is equivalent to the following CREATE TABLE statement:
CREATE TABLE FOO (A INT) (PARTITION BY RANGE(A) (STARTING(1) ENDING(2), STARTING(3) ENDING(4), STARTING(5) ENDING(6), STARTING(7) ENDING(8), STARTING(9) ENDING(10))
In the case of dates and timestamps, the EVERY value must be a labeled duration. For example:
CREATE TABLE FOO (A DATE) PARTITION BY RANGE(A) (STARTING('2001-01-01') ENDING('2010-01-01') EVERY(3 MONTHS))
The columns that make up the partitioning key must be a subset of the columns that make up any unique constraints over the table. Floating point, LOB, date, time, timestamp, DataLink, and ROWID columns cannot be used in a partitioning key.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.