Posts Tagged ‘dbms_random’

Introducing: Stumble Upon a Post

It’s the season of stumbling:

StumbleUpon, in its most recent toolbar, introduced a new feature called StumbleThru, which allows users to stumble through pages on a specific web site. Google introduced a recommendations button that you can add to the Google toolbar. The button looks like a pair of dice. Every time you click on the dice, […]

More on Generating Strings

A while ago I blogged about how you could use the rpad function to generate a string of any length. Kristian suggested another way to do it, using the dbms_random.string function. In this post, I will write about what I have noticed when using the two approaches.

Generate a string of any size

While reading this page, I stumbled upon a trick (by Tom Kyte) to generate an alphanumeric character string of any length using the Oracle SQL function RPAD. The emphasis here is on the length of the string, not its content. Let’s say you want to generate a 10 character string, you can easily do it […]

Pre DBMS_RANDOM

Back in the old days when DBMS_RANDOM did not exist ( pre Oracle 8 ), How did Oracle developers generate random numbers? Now I know.

ORDER BY no order

If you want your result set ordered by something, you better use the ORDER BY clause. If you don’t, there is no guarantee that the rows from the query will be ordered in any way. Fine, you may already know that. But, what about if you want to make sure that the rows from a […]

Random string generator

If you’ve ever wanted to generate a random password, a random number, or just a random string, dbms_random is here to help. Here is an example of the different uses of this useful package: