A column with a DEFAULT value may be required (NOT NULL), or it may be null (NULL). In my opinion, from the point of view of writing queries, it is better to have required columns, because a column that allows zero values โโcan lead to unnecessary complexity:
Example # 1 : in some cases, if you want to show all inactive lines, you can write
WHERE Publicbit = 0
but if this column allows null, you can use
WHERE Publicbit = 0 OR Publicbit IS NULL
Example # 2 : if you want to show those lines that have different values โโfor MyColum1 and MyColum2 , you can use
WHERE MyColumn1 <> MyColumn2
but if these columns are null then you should rewrite in this way
WHERE MyColumn1 <> MyColumn2 OR MyColumn1 IS NULL AND MyColumn2 IS NOT NULL OR MyColumn1 IS NOT NULL AND MyColumn2 IS NULL
or
WHERE MyColumn1 <> MyColumn2 OR EXISTS ( SELECT MyColumn1 EXCEPT SELECT MyColumn2 )
source share