Skip to content


Selecting random rows from an oracle table

Posted in Database, Technology.

SELECT * FROM (SELECT * FROM TEST_TABLE ORDER BY dbms_random.value) WHERE rownum <= 5;
This will give 5 random rows from table.

Note from Author :
I maintain my website, write articles and reply comments because of my interest/hobby to share information and knowledge.

If you liked the post, Please
Follow me on twitter: http://twitter.com/pankajbatracom
Join My facebook page: http://www.facebook.com/pankajbatra.blog
Join me on LinkedIn: http://www.linkedin.com/in/batrapankaj
Or subscribe to updates by Email by clicking here

To subscribe for updates, Enter your email address:

Related posts:

  1. Facebook Email in response to Google Gmail Buzz
  2. How to drop everything on a oracle schema
  3. How to schedule jobs in Oracle
  4. How to create a new user on oracle
  5. Substitute of LIMIT clause (as used in MySQL) in O…


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.







Some HTML is OK

or, reply to this post via trackback.