Monday, May 4, 2009

How to select random records in SQl Server.

Hi Guys,

Most of the developers, asking in forums how to select random records from the database in Sql Server.

Here script:

SELECT TOP 5 employeeID, FName,LName from Employee
ORDER BY NEWID();



Thank you
Keep It Watch

1 comment: