The VALUE function generates a random number within the range of [0, 1), with 38 digits to the right of the decimal point (namely with a 38-digit precision).
It can also generate an OceanBase random number x in the range of [low, high).
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only MySQL mode.
Syntax
DBMS_RANDOM.VALUE
RETURN NUMBER;
DBMS_RANDOM.VALUE(
low IN NUMBER,
high IN NUMBER)
RETURN NUMBER;
Parameters
| Parameter | Description |
|---|---|
| low | The minimum value of the random number. The number can be equal to the value of this parameter. |
| high | The upper bound of the random number. The number generated is smaller than the value of this parameter. |
Return values
| Return value | Description |
|---|---|
| NUMBER | An OceanBase number. |