> these comparisons don't evaluate to false, they evaluate to NULL
In the databases I've used, such as MSSQL[1], they evaluate to UNKNOWN.
[1]: https://docs.microsoft.com/en-us/sql/t-sql/language-elements...
In the databases I've used, such as MSSQL[1], they evaluate to UNKNOWN.
[1]: https://docs.microsoft.com/en-us/sql/t-sql/language-elements...
Sql does not have this problem.
create table #nulltest (a bit null);
insert into #nulltest(a) values (0),(1);
insert into #nulltest(a) values (null != null);However, that doesn't change things, I can't get any of these to parse:
insert into #nulltest(a) values (1 <> 0);
insert into #nulltest(a) values (null <> null);
insert into #nulltest(a) values (true and true);
insert into #nulltest(a) values (null and null);
So my question remains, how do you insert an UNKNOWN?The point of me asking is that it was my belief contrary to what was suggested, UNKNOWN is not the same as NULL and, crucially, does not evaluate as NULL.