Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Random field selection 1

Status
Not open for further replies.

Samdavo

Programmer
Oct 19, 2000
4
GB
I need to randomly select x amount of records from a table i.e. if the table holds 100 records I need to return 10 totaly random records.
 
Ignoring the larger philosophical question as to whether there is anything totally random in life,
select * from YourTable where dbms_utility.get_hash_value(dump(rowid),0,100)<10 Malcolm
 
Thanks you for your help Malcom that has worked a treat
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top