We walk in the dark places no others will enterWe stand on the bridge and no one may pass
CREATE TABLE #Temp (b BIT NOT NULL);INSERT #Temp VALUES (1);--INSERT #Temp VALUES ('True'); -- 2005 onwardINSERT #Temp VALUES (456);-- SuccessSELECT *FROM #TempWHERE b = 1;-- No rows-- 456 is interpreted as an integer-- Integer has a higher precedence than BIT-- So the BIT column value is converted to an integer-- to make the comparisonSELECT *FROM #TempWHERE b = 456;-- SuccessSELECT *FROM #TempWHERE b = CONVERT(BIT, 456);DROP TABLE #Temp;