Boolean ‘NOT’ in T-SQL not working on ‘bit’ datatype? January 27, 2023 by Tarik Use the ~ operator: DECLARE @MyBoolean bit SET @MyBoolean = 0 SET @MyBoolean = ~@MyBoolean SELECT @MyBoolean