Home » SQL & PL/SQL » SQL & PL/SQL » Sampling
Sampling [message #2401] Thu, 11 July 2002 13:22 Go to next message
Jerry
Messages: 21
Registered: December 1999
Junior Member
I have a table saved. Lets say it has 1000 records.
How can I retrieve a random sampling from the table.
Say 25% of the records randomly throughout the table?
Or say every 5th record in the entire table?
Re: Sampling [message #2402 is a reply to message #2401] Thu, 11 July 2002 13:29 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
this query selects every 5th record from the dba_tables.
 SELECT row_number,table_name FROM
 ( SELECT table_name, ROWNUM AS row_number FROM dba_tables )
 WHERE MOD(row_number,5) = 0 
Previous Topic: can a trigger create a table?
Next Topic: 9i documentation
Goto Forum:
  


Current Time: Thu Apr 25 07:50:03 CDT 2024