A database concept used to represent missing, unknown or inapplicable data.
35
votes
4answers
5k views
What is the difference between select count(*) and select count(any_non_null_column)?
I seem to remember that (on Oracle) there is a difference between uttering select count(*) from any_table and select count(any_non_null_column) from any_table.
What are the differences between these ...
0
votes
2answers
468 views
Is where x = 0 or x is null to be replaced by where isnull(x, 0) = 0 resp. where NVL(x, 0) = 0
Think of x as a column containing null, 0, 1.
Only less than 1 % of the rows contain 1.
There is no logical difference between 0 and Null.
Is it a good idea to insist, that isnull rather than NVL is ...
26
votes
2answers
4k views
NULL or NOT NULL by default?
In MySQL, is it better to always allow nulls unless you know a field is required, or always use Not Null unless you know a field will contain nulls? Or doesn't it matter?
I know in some DBMSs they ...
33
votes
7answers
5k views
When to use NULL and when to use an empty string?
I'm interested mainly in MySQL and PostgreSQL, but you could answer the following in general:
Is there a logical scenario in which it would be useful to distinguish an empty string from NULL?
What ...