Mark A wrote:[color=blue]
> "Jane" <jane_estrada@i2.com> wrote in message
> news:75f068bb.0407301431.725f49a5@posting.google.c om...
>[color=green]
>>In Oracle we can partition a table as follows. What is the equivalent in[/color]
>
> DB2?
>[color=green]
>>CREATE TABLE sales_list
>> (salesman_id NUMBER(5),
>> salesman_name VARCHAR2(30),
>> sales_state VARCHAR2(20),
>> sales_amount NUMBER(10),
>> sales_date DATE)
>> PARTITION BY LIST(sales_state)
>> (
>> PARTITION sales_west VALUES ('a','b'),
>> PARTITION sales_east VALUES ('e', 'f'),
>> PARTITION sales_central VALUES ('c', 'd')
>> );
>>
>>We are using DB2 8.1.3 on AIX.
>>
>>Thanks,
>>-Jane[/color]
>
>
> In DB2 for LUW you cannot partition a single table by ranges, only by a hash
> key that is usually designed to randomly distribute the data evenly across
> all partitions for improving parallel processing.
>
> In DB2 you can create separate tables for each partition and create a UNION
> ALL view which allows programs to see them as one table, and which has
> almost of all of the advantages of range partitioning of a single table.
> Please refer to the following article about this:
>
http://www-106.ibm.com/developerwork...202zuzarte.pdf
>
>[/color]
Just to be truely pendantic, the Oracle example above is showing list
partitioning, not range partitioning (although the example, as it stands
in it's simplicity, could be done with range partitioning).