The following are the programs it contains:
INITIALIZE - gives the random no. generator a seed.
RANDOM - returns a random no.
SEED - resets the generator seed no.
TERMINATE - ends the random no. mechanism.
To run it you need to run
DBMS_RANDOM.Initialize( seed IN BINARY_INTEGER) - where seed is a number you supply with > 5 digits to ensure, er, randomness....
Then you can call
FUNCTION DBMS_RANDOM.RANDOM return BINARY_INTEGER
This will give you a random no.
If you need lots of them you can use the SEED procedure (parms as per Initialize) to reset the generator.
Finally when you're done you should call
PROCEDURE DBMS_RANDOM.TERMINATE
to free up any memory used by the package...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.