Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 37621 invoked from network); 27 Oct 2005 00:22:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 Oct 2005 00:22:31 -0000 Received: (qmail 16463 invoked by uid 500); 27 Oct 2005 00:22:30 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 16442 invoked by uid 500); 27 Oct 2005 00:22:30 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 16431 invoked by uid 99); 27 Oct 2005 00:22:30 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Oct 2005 17:22:30 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [192.18.98.34] (HELO brmea-mail-3.sun.com) (192.18.98.34) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Oct 2005 17:22:27 -0700 Received: from phys-d3-ha21sca-2 ([129.145.155.165]) by brmea-mail-3.sun.com (8.12.10/8.12.9) with ESMTP id j9R0M83H001189 for ; Wed, 26 Oct 2005 18:22:09 -0600 (MDT) Received: from conversion-daemon.ha21sca-mail1.sfbay.sun.com by ha21sca-mail1.sfbay.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) id <0IOZ00101T03NL@ha21sca-mail1.sfbay.sun.com> (original mail from Richard.Hillegas@Sun.COM) for derby-user@db.apache.org; Wed, 26 Oct 2005 17:22:31 -0700 (PDT) Received: from [129.144.89.216] (d-sfo07-89-216.SFBay.Sun.COM [129.144.89.216]) by ha21sca-mail1.sfbay.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) with ESMTP id <0IOZ00B5IT1J8S@ha21sca-mail1.sfbay.sun.com> for derby-user@db.apache.org; Wed, 26 Oct 2005 17:22:31 -0700 (PDT) Date: Wed, 26 Oct 2005 17:22:12 -0700 From: Rick Hillegas Subject: Re: Unique constraints on multiple fields with one nullable In-reply-to: <20051026223634.95863.qmail@web32507.mail.mud.yahoo.com> To: Derby Discussion Message-id: <43601DB4.1000605@sun.com> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) References: <20051026223634.95863.qmail@web32507.mail.mud.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Dan, I believe that the Sybase behavior is correct. I have logged bug 653 to track this issue. Regards, -Rick Dan Meany wrote: >I noticed that in Derby a unique constraint on two >columns A and B, with B nullable, will prevent >inserting two identical records that contain NULL in >B. > >This is different from some other databases such as >Sybase that do allow it (I assume where the null >records are not in stored as part of the unique >index). > >I noticed this while transfering data from Sybase to >Derby using Apache dbutils and getting rejected >duplicate records. > > >