Subject | Re: [firebird-support] case when, in, null semantics? |
---|---|
Author | Kjell Rilbe |
Post date | 2005-03-15T08:24:49Z |
Pavel Menshchikov wrote:
select *
from MyTable
where NullableField = 'a'
select *
from MyTable
where NullableField <> 'a'
Without three-state logic, the two selects above would, in union, return
all rows. They won't, because rows with null in NullableField will not
be returned by either of then.
Kjell
--
--------------------------------------
Kjell Rilbe
Adressmarknaden AM AB
E-post: kjell.rilbe@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64
> Kjell, could you give an example of an SQL statement (or whatever),Sure:
> which depends on three-state logic?
select *
from MyTable
where NullableField = 'a'
select *
from MyTable
where NullableField <> 'a'
Without three-state logic, the two selects above would, in union, return
all rows. They won't, because rows with null in NullableField will not
be returned by either of then.
Kjell
--
--------------------------------------
Kjell Rilbe
Adressmarknaden AM AB
E-post: kjell.rilbe@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64