There is no Boolean data type in SQL Server. One that is often used instead of Boolean is the Bit data type. It can store the values 0, 1 and NULL.
Code:
CREATE TABLE #MyTable(
Id INT NOT NULL,
TrueBoolean BIT NOT NULL DEFAULT 1,
FalseBoolean BIT NOT NULL DEFAULT 0,
UndefBoolean BIT
)
INSERT INTO #MyTable(Id) VALUES
(1)
SELECT * from #MyTable
--1 1 0 NULL
UPDATE #MyTable
SET TrueBoolean = 0
WHERE UndefBoolean IS NULL
--1 0 0 NULL
SELECT * FROM #MyTable
WHERE FalseBoolean = 1
-- empty result set