<p>Trying to perform a single boolean NOT operation, it appears that under MS SQL Server 2005, the following block does not work</p>

<pre><code>DECLARE @MyBoolean bit;
SET @MyBoolean = 0;
SET @MyBoolean = NOT @MyBoolean;
SELECT @MyBoolean;
</code></pre>

<p>Instead, I am getting more successful with</p>

<pre><code>DECLARE @MyBoolean bit;
SET @MyBoolean = 0;
SET @MyBoolean = 1 - @MyBoolean;
SELECT @MyBoolean;
</code></pre>

<p>Yet, this looks a bit a twisted way to express something as simple as a negation.</p>

<p>Am I missing something?</p>

Your solution is a good one...  you can also use this syntax to toggle a bit in SQL...
```
```
DECLARE @MyBoolean bit;
SET @MyBoolean = 0;
SET @MyBoolean = @MyBoolean ^ 1; 
SELECT @MyBoolean;
```
```