SQL Server Q&A: Does SQL Server have a boolean data type? Is that a bit?
Simple answer: No
SQL Server has a concept of boolean data type but it doesn’t have an actual boolean data type. I can’t declare a column with a boolean data type, and I can’t use it that way. However, the concept of boolean data is present.
For example, if I write the following:
SELECT * FROM Sometable WHERE Somecolumn = Someothercolumn
the outcome of that comparison is TRUE, FALSE, or (don’t forget) NULL. And remember that NULL isn’t a value; it’s the lack of a value. WHERE clauses are satisfied when the value of the predicate is TRUE.
2018-10-01
