Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Is there any RANDOM functions in PL/SQL?
Weidong Zhou <weidong.zhou_at_sabre.com> wrote in message news:38767482.761F244E_at_sabre.com...
> Daniel,
> I found something about random number on Internet. Oracle has DBMS_RANDOM
> package that can generate random number. I also found a simple sample code
> as follows:
>
> DECLARE
> i BINARY_INTEGER;
> BEGIN
> dbms_random.initialize(19254);
> i := dbms_random.random;
> INSERT INTO some_table VALUES(i);
> dbms_random.terminate;
> END;
>
> The problem is when I run the the code, I got some errors like
> ORA-06550: line 4, column 5:
> PLS-00201: identifier 'DBMS_RANDOM.INITIALIZE' must be declared
>
> I am not a DBA, so I wonder how do I run DBMS_RANDOM package? Anyone has
> ideas? Thanks.
DBMS_RANDOM package is not created in a default installation. You may ask your DBA to create it and grant the execution privilege to you. Received on Sun Jan 09 2000 - 09:42:32 CST
![]() |
![]() |