Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: random records
Faby wrote:
> Hi, I have to select 50 random records from a table. How should i
> proceed? Should I use "sample", "dbms_random.value"...?
> Thanks
Use the SAMPLE clause ... that's what it was made for.
SELECT *
FROM t
SAMPLE(10);
for example.
Demos in Morgan's Library at www.psoug.org under SELECT STATEMENTS.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Wed Jul 12 2006 - 10:44:29 CDT
![]() |
![]() |