title: How do I generate a random number for each row in a T-SQL select?
body: <p>I need a different random number for each row in my table.  The following seemingly obvious code uses the same random value for each row.</p>
  
  <pre><code>SELECT table_name, RAND() magic_number 
  FROM information_schema.tables 
  </code></pre>
  
  <p>I'd like to get an INT or a FLOAT out of this.  The rest of the story is I'm going to use this random number to create a random date offset from a known date, e.g. 1-14 days offset from a start date.</p>
  
  <p>This is for Microsoft SQL Server 2000.</p>