Translation: SQL Server is randomly sorted
Randomly Sorting Query Results Query Result Random Sort Q. How can I Randomly Sort Query Results? Q: How can I randomly sort the query results? A. To randomly order rows, or to return x number of randomly chosen rows, you can use the RAND function inside the SELECT statement. But the RAND function is resolved only once for the entire query, so every row will get same value. You CAN use an order by the result from the newid function, as the backing code shows: A: The result record is random sort, or returned to the x-record record, can be implemented by using the RAND function in the SELECT statement . However, the RAND function only generates only once in the query, so each line will get the same value. The method can be sorted by using the NewID function in the Order By clause, the code is as follows: select * from northwind..roDERS ORDER BY newid () SELECT TOP 10 * from northwind..IrDERS Order by newid () author: Water