The RAND function returns a floating point value greater than or equal to 0 and less than or equal to 1.
The data type of the result is double-precision floating point. If the argument can be null, the result can be null; if the argument is null, the result is the null value.
A specific seed value will produce the same sequence of random numbers for a specific instance of a RAND function in a query each time the query is executed. If a seed value is not specified, a different sequence of random numbers is produced each time the query is executed.
The seed value is used only for the
first invocation of an instance of the RAND function within a statement.
RAND is a non-deterministic function.
SELECT RAND(:HRAND) FROM SYSIBM.SYSDUMMY1Returns a random floating-point number between 0 and 1, such as the approximate value .0121398.
SELECT RAND(:HRAND) * 10 FROM SYSIBM.SYSDUMMY1