VALUE function

The VALUE function returns a random number in a specified range.

The function returns a DECFLOAT value.

Syntax

Read syntax diagramSkip visual syntax diagramDBMS_RANDOM.VALUE(low-value,high-value)

Description

low-value
An expression that returns an integer that specifies the lower bound on the random number.
high-value
An expression that returns an integer that specifies the upper bound on the random number.

Calling VALUE with no parameters defaults to returning a random number between 0 and 1.

If low-value or high-value are NULL, then the result is NULL.

Note: Calling VALUE before seeding the random number generator explicitly by calling SEED, SEED_STRING, or INITIALIZE defaults to using a seed that is based on the system current timestamp.