title: How to flip random bits in SQL
body: <p>For testing purposes I want to update a table by setting bits in colums to a random value.</p>
  
  <pre><code>update [Planned] 
  set [IsPlannable] = 1 * rand(cast(cast(newid() as binary(8)) as int))
  WHERE [ComputerID] &gt; 100
  </code></pre>
  
  <p>It does seem to work as it should <em>but not the way I want it</em>. I guess the problem is the result will most of the time be higher than 1.</p>
  
  <p>How can I <strong>flip random bits</strong> to <strong>random values</strong>?</p>