SQLUSA

Microsoft SQL Server 2005 Best Practices

 

How to sort results randomly?

 

Execute the following script in Query Editor to randomly sort the result of the query:

use AdventureWorks;

select top (100) Email = EmailAddress
from Person.Contact
order by newid();


 

The World Leader in SQL Server Training
 
 
SQLUSA.com Home Page