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® Multisystem topic collection.
An expression that returns a value of any built-in
data type except date, time, timestamp, floating-point, XML, 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.
SELECT HASH(EMPNO, LASTNAME) FROM EMPLOYEE