Selecting Random Rows in SQL Server 2005
Here is a quick an easy way to select random rows in SQL Server 2005:
SELECT ColumnA, ColumnB FROM dbo.[TableName] ORDER BY NEWID()
Here is a quick an easy way to select random rows in SQL Server 2005:
SELECT ColumnA, ColumnB FROM dbo.[TableName] ORDER BY NEWID()
Thats me above wearing one of my favorite Adidas track jackets. This is my home on the web showcasing some of my work over the past few years in the Interactive Marketing/Advertising field. In addition to my portfolio you'll find some personal information about me as well as some ramblings on some of the research and development I participate in. Enjoy!
February 21st, 2008 at 12:30 am
Thanks for this, I was just wondering “how” exactly it works….
just for clarification, if I were to build a “random image” in ASP.NET this would be what I need to use??