DBMS_RANDOM

Example

Generate a random number between 0 and 1.

SELECT DBMS_RANDOM.VALUE(0,1);

Specify the low and high parameters to an integer within the specified range and intercept smaller values from the result. (The maximum value cannot be a possible value.) Therefore, use the following code for an integer between 0 and 99:

SELECT TRUNC(DBMS_RANDOM.VALUE(0,100));