Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Randomly pick
In Oracle 8.1.6 you could use the new SAMPLE clause:
select * from big_table sample (1);
would produce a random sample of about 1% or the rows. To get 100,000 from 10,000,000 try a 1.05% sample, then stop after the first 100,000 rows.
-- Jonathan Lewis Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk Practical Oracle 8i: Building Efficient Databases Publishers: Addison-Wesley See a first review at: http://www.ixora.com.au/resources/index.htm#practical_8i More reviews at: http://www.jlcomp.demon.co.uk/book_rev.html Anna Henson wrote in message ...Received on Wed Jan 10 2001 - 12:58:40 CST
>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
>
>