Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: random in PL/SQL

Re: random in PL/SQL

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 15 Dec 2001 13:34:13 -0800
Message-ID: <9vgfkl0vhi@drn.newsguy.com>


In article <vv8n1uk2grj3fg7u7lcudkmlu2vu2kka92_at_4ax.com>, Sybrand says...
>
>On Sat, 15 Dec 2001 19:56:50 +0100, Jan Eliasen <eliasen_at_cs.auc.dk>
>wrote:
>
>>Hi there.
>>
>>I can't find a random function in PL/SQL - can that be true? I've searched
>>through all the documentation I could find.
>>
>>So what do I do if I want a random number between 18 and 100?
>
>
>Use the dbms_random package when running 8.1.5 and higher, and use

803 or higher -- just run $ORACLE_HOME/rdbms/admin/catoctk.sql if its not installed...

in 73 and before, you can see
http://osi.oracle.com/~tkyte/Misc/Random.html

for a random package that works just like the C rand() function.

>http://tahiti.oracle.com as a search engine for the doco.
>
>Hth
>
>Sybrand Bakker, Senior Oracle DBA
>
>To reply remove -verwijderdit from my e-mail address

--
Thomas Kyte (tkyte@us.oracle.com)             http://asktom.oracle.com/ 
Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/  
Opinions are mine and do not necessarily reflect those of Oracle Corp 
Received on Sat Dec 15 2001 - 15:34:13 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US