Oracle9i Supplied PL/SQL Packages and Types Reference Release 2 (9.2) Part Number A96612-01 |
|
DBMS_RANDOM , 2 of 2
Subprogram | Description |
---|---|
Initializes the package with a seed value. |
|
Resets the seed. |
|
Gets the random number. |
|
Closes the package. |
To use the package, first call the initialize subprogram with the seed to use.
DBMS_RANDOM.INITIALIZE ( seed IN BINARY_INTEGER);
Note: Use a seed that is sufficiently large, more than 5 digits. A single digit may not return sufficiently random numbers. Also consider getting the seed from variable values such as the time. |
Parameter | Description |
---|---|
seed |
Seed number used to generate a random number. |
This procedure resets the seed.
DBMS_RANDOM.SEED ( seed IN BINARY_INTEGER);
Parameter | Description |
---|---|
|
Seed number used to generate a random number. |
This function gets the random number.
DBMS_RANDOM.RANDOM RETURN BINARY_INTEGER;
When you are finished with the package, call the TERMINATE
procedure.
DBMS_RANDOM.TERMINATE;
|
Copyright © 2000, 2002 Oracle Corporation. All Rights Reserved. |
|