IBM Books

SQL Reference


Partition Compatibility

Partition compatibility is defined between the base data types of corresponding columns of partitioning keys. Partition compatible data types have the property that two variables, one of each type, with the same value, are mapped to the same partitioning map index by the same partitioning function.

Table 9 shows the compatibility of data types in partitions.

Partition compatibility has the following characteristics:


Table 9. Partition Compatibilities
Operands Binary Integer Decimal Number Floating Point Character String Graphic String Date Time Time- stamp UDT
Binary Integer Yes No No No No No No No 1
Decimal Number No Yes No No No No No No 1
Floating Point No No Yes No No No No No 1
Character String3 No No No Yes2 No No No No 1
Graphic String3 No No No No Yes No No No 1
Date No No No No No Yes No No 1
Time No No No No No No Yes No 1
Timestamp No No No No No No No Yes 1
UDT 1 1 1 1 1 1 1 1 1
Note:

1
A user-defined type (UDT) value is partition compatible with the source type of the UDT or any other UDT with a partition compatible source type.

2
The FOR BIT DATA attribute does not affect the partition compatibility.

3
Note that data types LONG VARCHAR, LONG VARGRAPHIC, CLOB, DBCLOB, and BLOB are not applicable for partition compatibility since they are not supported in partitioning keys.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]