[thelist] DB "Limit" Command Question

Petite Abeille petite.abeille at gmail.com
Thu Apr 16 15:48:57 CDT 2009


On Apr 16, 2009, at 9:24 PM, Edward McCarroll wrote:

> I refuse to believe that any respectable DBMS would scan an entire  
> table if the goal was to find "N random rows".

If you happen to use, say, hmmm, Oracle, there is a handy 'sample'  
clause:

select * from emp sample( 10 );

http://www.orafaq.com/wiki/SQL_FAQ#Can_one_select_a_random_collection_of_rows_from_a_table.3F

Cheers,

--
PA.
http://alt.textdrive.com/nanoki/




More information about the thelist mailing list