HASH

Click to skip syntax diagram
Read syntax diagramSkip visual syntax diagram            .-,----------.
            V            |
>>-HASH--(----expression-+--)----------------------------------><
 

The HASH function returns the partition number of a set of values. Also see the PARTITION function. For more information about partition numbers, see the DB2(R) Multisystem book.

expression
The arguments can be any built-in data type except date, time, timestamp, floating-point, or DataLink values.

The result of the function is a large integer with a value between 0 and 1023.

If any of the arguments are null, the result is zero. The result cannot be null.

Example