RAND function

The RAND numeric function returns a pseudo random number.

Syntax

Read syntax diagramSkip visual syntax diagram RAND(IntegerExpression)

The RAND function returns a pseudo random number in the range 0.0 to 1.0. If supplied, the parameter initializes the pseudo random sequence.

The parameter can be of any numeric data type, but any fractional part is ignored. The result is FLOAT unless the parameter is NULL, in which case the result is NULL.