Subject Re: empty string=null ?
Author cantak3
--- In firebird-support@yahoogroups.com, "roskiy" <roskiy@...> wrote:
>
> In FB1.5
> empty string<>null
>

This is not correct. Let A = null and B = Empty Str.

(A <> B) returns FALSE
(A = B) returns FALSE

A is an unknown value. It may be empty string, or it may not be
empty string. Therefore A is not B, and also A is not different
than B because it is undetermined.

If your code says:

if (A = B) then
DoSomething;
else
DoSomethingElse;

And you are wanting Null to be different than empty string, you are
simply getting lucky because your code will execute like you
thought, however:

if (A <> B) then
DoSomethingElse;
else
DoSomething;

Will not produce what you wanted.