Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Randomly pick
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
![]() |
![]() |