Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Kind of cool feature! DBMS_RANDOM

RE: Kind of cool feature! DBMS_RANDOM

From: Christopher Spence <>
Date: Wed, 05 Sep 2001 16:39:48 -0700
Message-ID: <>

 No problem at all,

I believe it is undocumented. If you do a desc you will see there are a few functions.

String is pretty cool, just populated 10,000,000 rows in my test database with it.

I placed it on my site under tips as it seems useful.

-----Original Message-----
To: Multiple recipients of list ORACLE-L Sent: 9/5/01 6:26 PM

Hi Chris,

Pl excuse me for writing directly. I looked up this package and there is no mention of the STRING option at all. Metalink search returned no hits. Could you please send me the location where you got the information from.

Thanks in advance


Christopher Spence wrote:   

In 8.1.6 Oracle added a new feature which I don't believe is very well documented, it is great.

DBMS_RANDOM.STRING([OPT], [LEN]); This will create a random string with a length of up to 60 characters. Great for force populating tables.
The opt is for things like L, U, M (Lower, Upper, Mixed case), there are a few different options.

One thing I did to force populate a table is: DBMS_RANDOM.STRING('U', DBMS_RANDOM.VALUE(5, 10)); Which creates random string with random length between 5 and 10 characters. Run 10,000,000 times, I got a table with 30 columns and 10,000,000 random rows in no time.

"Do not criticize someone until you walked a mile in their shoes, that way when you criticize them, you are a mile a way and have their shoes."

Christopher R. Spence
Oracle DBA
Phone: (978) 322-5744
Fax: (707) 885-2275

73 Princeton Street
North, Chelmsford 01863     


Please see the official ORACLE-L FAQ:

Author: Christopher Spence

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
To REMOVE yourself from this mailing list, send an E-Mail message to: (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Sep 05 2001 - 18:39:48 CDT

Original text of this message