DBMS_RANDOM

The DBMS_RANDOM package provides a built-in random number generator.

Table 7-5 describes the DBMS_RANDOM subprograms.

Table 7-5 DBMS_RANDOM Subprograms

Subprogram Description

INITIALIZE procedure

Initializes the package with a seed value (deprecated).

NORMAL function

Returns random numbers in a normal distribution.

RANDOM procedure

Generates a random number (deprecated).

SEED procedure

Resets the seed.

STRING function

Gets a random string.

TERMINATE procedure

Terminates the package (deprecated).

VALUE function

There are two overloaded versions. In the first, it gets a random number greater than or equal to 0 and less than 1, with 38 digits to the right of the decimal point (38-digit precision). In the second, it gets a random number within specified low and high limits.