DBMS_RANDOM
1997 단어 dbms_random
The
DBMS_RANDOM
package provides a built-in random number generator. 이 가방 에는 몇 개의 서브루틴 이 포함 되 어 있 습 니 다. 여기 에는 두 개의 서브루틴 만 소개 합 니 다.
RANDOM function
This procedure is deprecated. Although currently supported, it should not be used. It generates and returns a random number.
Syntax
DBMS_RANDOM.RANDOM
RETURN binary_integer;
Return value
A random
BINARY_INTEGER
value greater than or equal to -power(2,31)
and less than power(2,31)
VALUE function
One version returns a random number, greater than or equal to 0 and less than 1, with 38 digits to the right of the decimal (38-digit precision). The other version returns a random Oracle Database
NUMBER
value x
, where x
is greater than or equal to the specified low
value and less than the specified high
value. Syntax
DBMS_RANDOM.VALUE
RETURN NUMBER;
DBMS_RANDOM.VALUE(
low IN NUMBER,
high IN NUMBER)
RETURN NUMBER;
Parameters
Parameter
Description
low
Lower limit of the range in which to generate a random number
high
Upper limit of the range in which to generate a random number
Return value
A
NUMBER
value that is the generated random number 예: round (dbms random. value (0, 18), 0) 0 보다 크 고 18 보다 작은 정수 로 돌아 갈 수 있다.