<p>What is the best way to sort the results of a sql query into a random order within a stored procedure?</p>

[{'answer_id': 52976, 'author': 'Jimmy', 'author_id': 4435, 'author_profile': 'https://Stackoverflow.com/users/4435', 'pm_score': 4, 'selected': False, 'text': '<pre><code>select foo from Bar order by newid()\n</code></pre>\n'}, {'answer_id': 52982, 'author': 'harpo', 'author_id': 4525, 'author_profile': 'https://Stackoverflow.com/users/4525', 'pm_score': 2, 'selected': False, 'text': "<p>You can't just ORDER BY RAND(), as you know, because it will only generate one value.  So use a key for a seed value.</p>\n\n<pre>\nSELECT RAND(object_id), object_id, name\n  FROM sys.objects\n ORDER BY 1\n</pre>\n"}, {'answer_id': 52988, 'author': 'Jon Galloway', 'author_id': 5, 'author_profile': 'https://Stackoverflow.com/users/5', 'pm_score': 7, 'selected': True, 'text': '<p>This is a duplicate of <a href="https://stackoverflow.com/questions/19412/how-to-request-a-random-row-in-sql">SO# 19412</a>. Here\'s the answer I gave there:</p>\n\n<pre><code>select top 1 * from mytable order by newid()\n</code></pre>\n\n<p>In SQL Server 2005 and up, you can use TABLESAMPLE to get a random sample that\'s repeatable:</p>\n\n<pre><code>SELECT FirstName, LastName FROM Contact TABLESAMPLE (1 ROWS) ;\n</code></pre>\n'}, {'answer_id': 3942379, 'author': 'endo64', 'author_id': 333153, 'author_profile': 'https://Stackoverflow.com/users/333153', 'pm_score': 3, 'selected': False, 'text': '<p>Or use the following query, which returns a better random sample result:</p>\n\n<pre><code>SELECT * FROM a_table WHERE 0.01 &gt;= CAST(CHECKSUM(NEWID(), a_column) &amp; 0x7fffffff AS float) / CAST (0x7fffffff AS int)\n</code></pre>\n\n<p>0.01 means ~1 percent of total rows.</p>\n\n<p>Quote from SQL 2008 Books Online:</p>\n\n<blockquote>\n  <p>If you really want a random sample of\n  individual rows, modify your query to\n  filter out rows randomly, instead of\n  using TABLESAMPLE.</p>\n</blockquote>\n'}]
['https://Stackoverflow.com/questions/52964', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5466/']