Possible Duplicate:
How to request a random row in SQL?
Hi I am trying to select random records from a oracle database. I tried using the query below:
select field1
from (select field1 from table1 where field2='SAMPLE_VALUE' order by dbms_random.value)
where rownum <2;
This works just fine, except that it's extremely slow and expensive.
Do we have any quicker way to achieve this?