by Federico Razzoli | Sep 6, 2021 | MariaDB, MySQL, Other Databases, PostgreSQL
Any comparison involving at least one NULL operand will return NULL. This is an implicit characteristics of NULL. But sometimes developers write too verbose conditions to handle NULL. For example when they want to consider NULLs equal they...
by Federico Razzoli | Nov 14, 2020 | MariaDB, MySQL
It is not uncommon for an application to use WHERE conditions like this: WHERE status = ‘DELETED’ OR status IS NULL If you run EXPLAIN, such conditions typically only cause the type column to be show ref_or_null. Whereas,...
by Federico Razzoli | Oct 15, 2020 | SQL Language
In the article What does NULL mean in SQL? I explained why I consider SQL NULL inconsistent. As a general rule, I should have made clear that I don’t think it is a good idea to use NULL, even if columns are NULLable by default in SQL....
by Federico Razzoli | Aug 8, 2020 | SQL Language
SQL NULL is as consistentas Escher’s cube There have been endless discussions already if NULL should be implemented in relational databases, and if it should even be included in the relational theory. My favourite quote on this subject is from the person who helped...