[ 
http://issues.apache.org/jira/browse/DERBY-331?page=comments#action_12312960 ] 

Satheesh Bandaram commented on DERBY-331:
-----------------------------------------

That doesn't seem to be the correct syntax. Derby supports column level 
constraints, in the format:

ij> create table t ( a int not null unique, b int default 0);
0 rows inserted/updated/deleted

Or table level constraints, like:

ij> create table t (a int not null, b int default 0, constraint tk unique (a));
0 rows inserted/updated/deleted

See documentation at:
http://incubator.apache.org/derby/docs/ref/rrefsqlj13590.html

> create table fails when a constraint defintion follows a column default
> -----------------------------------------------------------------------
>
>          Key: DERBY-331
>          URL: http://issues.apache.org/jira/browse/DERBY-331
>      Project: Derby
>         Type: Bug
>   Components: SQL
>     Versions: 10.0.2.1
>  Environment: Windows XP
>     Reporter: Gin Ng
>     Priority: Minor

>
> The following statement fails with syntax error.
> ij> create table t (a int not null, b int default 0, unique (a));
> ERROR 42X01: Syntax error: Encountered "0" at line 1, column 47.
> And it will work if I remove either default 0 or unique(a).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to