title: How do I flip a bit in SQL Server?
body: <p>I'm trying to perform a bitwise NOT in SQL Server. I'd like to do something like this:</p>
  
  <pre><code>update foo
  set Sync = NOT @IsNew
  </code></pre>
  
  <p>Note: I started writing this and found out the answer to my own question before I finished. I still wanted to share with the community, since this piece of documentation was lacking on MSDN (until I added it to the Community Content there, too).</p>