Random Selection in SQL 2000 
Author Message
 Random Selection in SQL 2000

Try:

select top 5 *
from MyTable
order by newid()

--
Tom

---------------------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql

I am trying to produce a random selection of 5 records
out of a table containing 2000 rows, can anyone tell me
the best way to deal with this.



Fri, 09 Dec 2005 16:11:09 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. SQL-->random selections

2. SQL random selection

3. Random selection of records in PL/SQL

4. SQL Server 2000 installation not allowing drive selection

5. VIEW Selection Error on SQL 2000

6. SQL 7.0 Random function, does not work like SQL 6.5 Random function

7. Random selection from table

8. Random selection

9. Emulating Access RANDOM automnumber field behavior in SQL 2000

10. Random selection from table

11. Random Selection

12. Random Selection of 25 Members


 
Powered by phpBB® Forum Software