![]() |
|||
|
![]() |
![]() |
|
FULL A - Z Oracle Function Library (formerly named "Morgan's Library")
![]() Term: ORDER BY
Definition: Random Ordering To order rows randomly, you must use DBMS_RANDOM, as shown here: SELECT column FROM In the example above, 5 randomly selected rows will be returned. You can also get a random sample, by using the SAMPLE clause with a SELECT statement: SELECT * FROM users SAMPLE(15); In the example above, Oracle is instructed to randomly return 15% of the rows in the 'users' table. Note that the SAMPLE clause only works for single table queries on local tables. Related Links: Related Code Snippets:
|
![]() |
Home | Search | Code Library | Sponsors | Privacy | Terms of Use | Contact Us | © 2003 - 2025 psoug.org |