Re: NULLs: theoretical problems?
Date: Mon, 27 Aug 2007 07:58:38 -0000
On 26 aug, 10:28, Jon Heggland <jon.heggl..._at_idi.ntnu.no> wrote:
> Quoth Jan Hidders:
> > On 24 aug, 14:42, Jon Heggland <jon.heggl..._at_idi.ntnu.no> wrote:
> >> But I believe these queries are equivalent:
> >> SELECT * FROM t WHERE DEF t.a : t.a = 5
> >> SELECT * FROM t WHERE t.a = 5
> > As Bob correctly remarked, the second would raise some kind of
> > (static, if that applies) error.
> I realise that; I meant the second query to be evaluated in normal SQL.
Ah, I see.
> But anyway: Can potential NULL-ness always be discovered statically?
Not precisely. For example, for the part of SQL that corresponds to first-order logic that would be undecidable. But in practice you can come up with a set of rules that maybe strictly speaking too strict but still allows you comfortably to express everything.
- Jan Hidders