Subject | Re: [firebird-support] Re: nulls in unique constraints |
---|---|
Author | Ann W. Harrison |
Post date | 2006-07-03T15:51:17Z |
Dmitry Yemanov wrote:
constraint, so the 2 in the second insert is irrelevant.
Regards,
Ann
>Sorry, I misread the example - ID is not part of the
>> CONSTRAINT UQ_test UNIQUE (a,b,c)
>> INSERT INTO TEST (ID, A, B, C) VALUES (1, 1, 1, NULL);
>> INSERT INTO TEST (ID, A, B, C) VALUES (2, 1, 1, NULL);
>>
>> -- above line violates unique constraint.
>
>... but two sets {1, 1, NULL} and {1, 1, NULL}
> are considered not distinct, so the second insert violate the constraint.
> And this perfectly matches the SQL spec.
>
constraint, so the 2 in the second insert is irrelevant.
Regards,
Ann