title: How to use LIMIT keyword in SQL Server 2005?
body: <p>I have found a way to select random rows from a table in <a href="https://stackoverflow.com/questions/19412/how-to-request-a-random-row-in-sql">this post</a>. A suggestion is to use the following query:</p>
  
  <pre><code>SELECT * FROM employee ORDER BY RAND() LIMIT 1
  </code></pre>
  
  <p>But when I run this query in MS SQL 2005, I get the following error message</p>
  
  <pre><code>Msg 102, Level 15, State 1, Line 1
  Incorrect syntax near 'LIMIT'.
  </code></pre>
  
  <p>Can anyone tell me where am I wrong? Doesn't MS SQL support LIMIT? If so, then how can I do this? </p>