The VALUE function returns a random number that satisfies the following conditions: it is greater than or equal to 0, less than 1, and has 38 digits after the decimal point (i.e., 38 digits of precision).
Alternatively, you can get a random number x from OceanBase Database, where x is greater than or equal to the low value and less than the high value.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this function.
Syntax
DBMS_RANDOM.VALUE
RETURN NUMBER;
DBMS_RANDOM.VALUE(
low IN NUMBER,
high IN NUMBER)
RETURN NUMBER;
Parameters
| Parameter | Description |
|---|---|
| low | The smallest random number in the range. The generated number can be equal to the low value. |
| high | The largest random number in the range. The generated number is less than the high value. |
Return value
| Return value | Description |
|---|---|
| NUMBER | The OceanBase Database number. |
