Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 81380 invoked from network); 18 Jun 2007 13:41:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jun 2007 13:41:47 -0000 Received: (qmail 67058 invoked by uid 500); 18 Jun 2007 13:41:50 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 67029 invoked by uid 500); 18 Jun 2007 13:41:50 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 67018 invoked by uid 99); 18 Jun 2007 13:41:50 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jun 2007 06:41:50 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jun 2007 06:41:46 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 56CD171419B for ; Mon, 18 Jun 2007 06:41:26 -0700 (PDT) Message-ID: <28221741.1182174086353.JavaMail.jira@brutus> Date: Mon, 18 Jun 2007 06:41:26 -0700 (PDT) From: "Bernt M. Johnsen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-2167) Slightly misleading error message for UNIQUE constraint without NOT NULL constraint In-Reply-To: <26200468.1165917921021.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-2167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bernt M. Johnsen updated DERBY-2167: ------------------------------------ Component/s: Newcomer > Slightly misleading error message for UNIQUE constraint without NOT NULL constraint > ----------------------------------------------------------------------------------- > > Key: DERBY-2167 > URL: https://issues.apache.org/jira/browse/DERBY-2167 > Project: Derby > Issue Type: Bug > Components: Miscellaneous, Newcomer > Reporter: Bernt M. Johnsen > Priority: Trivial > > With UNIQUE contraint, you get an error message which indicates you also need explicit NOT NULL constraint for PRIMARY KEY constraint, which is not true . NOT NULL is implicit for PRIMARY KEY (or more precise according to the lingo in the SQL standard: PRIMARY KEY is an alternative syntax for UNIQUE NOT NULL) > ij> create table t1 (i integer unique); > ERROR 42831: 'I' cannot be a column of a primary key or unique key because it can contain null values. > ij> create table t2 (i integer unique not null); > 0 rows inserted/updated/deleted > ij> create table t3 (i integer primary key); > 0 rows inserted/updated/deleted > ij> create table t4 (i integer primary key not null); > 0 rows inserted/updated/deleted -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.