Is there a random number generator in oracle that I could call from my programs?
Printable View
Is there a random number generator in oracle that I could call from my programs?
connect (as sys user)
@dbmsoctk.sql
@prvtoctk.plb
@dbmsrand.sql
exit
Test the package in sql plus as a normal user
SQL> execute dbms_random.initialize(123123);
PL/SQL procedure successfully completed.
SQL> select dbms_random.random from dual;
RANDOM
---------
997342005
exec DBMS_RANDOM.TERMINATE;