Subject Re: [firebird-support] Unique index NULL == NULL?
Author Steve Apiki
Thanks for your response, Helen. I have a follow up question:

At 06:18 PM 11/12/2003, you wrote:
>In this case, the condition UNIQUE can not be True if ( SELECT UCL FROM TN
>) could output two rows having all segments non-null and all of the
>corresponding segments matching.

This seems to indicate to me that (1, NULL, NULL) <> (1, NULL,
NULL), because all segments are not non-null. Is that correct?

>For multi-column result sets of (
>SELECT UCL FROM TN ), the common rules for NULLs are applied, i.e. (1,
>NULL) is distinct from (NULL, 1) and one (NULL, NULL) is distinct from any
>other (NULL, NULL).

But is (1, NULL) distinct from (1, NULL)?

In a test case, if I have a unique constraint on three columns, and I
insert (NULL, NULL, NULL), I can do this repeatedly. But if I insert (1,
NULL, NULL) a second time, I get a constraint violation.

Thanks again,

--Steve Apiki


Stephen Apiki
Developer
Appropriate Solutions, Inc. (www.AppropriateSolutions.com)
apiki@...