Subject Re: [firebird-support] Compound foreign key & null value bug?
Author Ann Harrison
On Thu, Oct 25, 2012 at 12:49 PM, Rick Debay <rdebay@...> wrote:

> > I'd have to say that for foreign key relationships a null in the
> referencing field is considered to match
>
> How about in the referenced field? BTW, thanks for the quick reply.
>

The referenced fields have to be subject to a primary or unique key
constraint. Primary is easy. No
nulls. Unique constraints are not so very clear and various databases
handle them differently. My
understanding of the standard is that if you have a Unique constraint the
following pairs of values are
OK: (A, B), (A, null), (null, B) but that you could not have two pairs
(A, null) and (A, null).

Cheers,

Ann


[Non-text portions of this message have been removed]