Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to select 10 random records?

movilogoJul 27 2009 — edited Jul 27 2009
Requirement is:

Show all records if query returns less than equal to 10 records.

Else

Show random 10 records.

How do I achieve that using SQL alone?

Tried with sample but that didn't work. The number of records in table continuously growing.

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 24 2009
Added on Jul 27 2009
11 comments
8,294 views