Tuesday, October 24, 2006

SQL: Select a random record

Selecting a random record from Table/View. Assuming the table name is Contact:

   SELECT TOP 1 * FROM Contact ORDER BY NEWID()
   GO


No comments: