morinia
asked on
selecting random records in an Oracle query
Experts,
I would like to select a certain number of random records in an Oracle query.
SELECT *
FROM (
SELECT *
FROM mytable
ORDER BY
dbms_random.value
)
WHERE rownum <= 1000
I saw this code on the internet. Can someone tell me what dbms_random.value is. I
I would like to select a certain number of random records in an Oracle query.
SELECT *
FROM (
SELECT *
FROM mytable
ORDER BY
dbms_random.value
)
WHERE rownum <= 1000
I saw this code on the internet. Can someone tell me what dbms_random.value is. I
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.