returning random row from small resultset Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: returning random row from small resultset

  1. #1
    Join Date
    Jul 2000
    I would like to return 1 row of a set randomly, for instance:

    (table test_table has 4 rows in it)

    select from test_table

    (this should give me back 1 of the 4 rows randomly, but with a normal distribution. i.e. After calling this function 100 times I should get each row about 25 times each)

    Is this possible in Oracle? What is the best performing method to do it?

    thanks much-

  2. #2
    Join Date
    Aug 2000
    use the dbms_random package.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width