Trying to perform a single boolean NOT operation, it appears that under MS SQL Server 2005, the following block does not work
DECLARE @MyBoolean bit;
SET @My
To assign an inverted bit, you'll need to use the bitwise NOT operator. When using the bitwise NOT operator, '~', you have to make sure your column or variable is declared as a bit.
This won't give you zero:
Select ~1
This will:
select ~convert(bit, 1)
So will this:
declare @t bit
set @t=1
select ~@t