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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Randomly pick

Re: Randomly pick

From: TurkBear <noone_at_nowhere.com>
Date: Wed, 10 Jan 2001 12:30:20 -0600
Message-ID: <taap5t0lrnqke2o7c36qoo983gl3e3noj7@4ax.com>

A simple, altho' not scientifically random in the true sense, is to do a non-ordered no index select like:

Select * from big_table where rownum < 100001;

Since data is stored in Oracle in non-defined ( and hence, randomlike ) order the100,000 rows returned will be sort of random...

There are better and more scientific methods but if all you need is a non-specific set of records, that should do it...

"Anna Henson" <anna_henson_at_yahoo.com> wrote:

>Dear Oracle users,
>
>Please show me how to write a query to randomly picked 100,000 accounts from
>a table that has about 10 million accounts.
>Thank you for your help.
>
>
>Anna Henson
>
Received on Wed Jan 10 2001 - 12:30:20 CST

Original text of this message

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