title: Insert Unique PRNG into Db column
body: <p>Is it possible to insert a unique pseudo-random number next to every existing record in a table?</p>
  
  <p>Something like:</p>
  
  <pre><code>UPDATE Products P1
  SET RandomId = Random()
  WHERE NOT EXISTS (
      SELECT Id
      FROM Products P2
      WHERE RandomId = [The same random as above]
  )
  </code></pre>
  
  <p>(Yes, I'm aware that would just skip conflicts, not resolve them)</p>
  
  <p>I'm aware I could do this iteratively through code or even in multi-line statement - but is there a single command which would do this for me?</p>
  
  <p>NB: This question is for my own edification so Microsoft SQL Server and MySQL answers both appreciated. Thanks.</p>