db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Nielsen (JIRA)" <j...@apache.org>
Subject [jira] Closed: (DERBY-2167) Slightly misleading error message for UNIQUE constraint without NOT NULL constraint
Date Fri, 09 Nov 2007 09:09:50 GMT

     [ https://issues.apache.org/jira/browse/DERBY-2167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Thomas Nielsen closed DERBY-2167.
---------------------------------

    Resolution: Won't Fix

Since there has been no feedback on this, I'm closing as "won't fix".

> 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
>            Assignee: Thomas Nielsen
>            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.


Mime
View raw message