My guess is that due to that NULL vs '' distinction the DBI module intentionally does not treat '' or 0 as NULL.I'd disagree slightly. Equating undef with NULL seems completely natural to me, as both of them mean "the value is either unknown or inapplicable". Both 0 and '' are known values, so they are neither undef nor NULL.
The major difference between undef and NULL is just that perl takes the pragmatic course of assuming that the unknown is false, where SQL is strictly correct about it and insists that the truth of any expression depending on an unknown is also unknown.
In reply to Re^2: Want DBI to load empty strings as NULL
by dsheroh
in thread Want DBI to load empty strings as NULL
by Narveson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |