If present bug report in breaf,
ij> connect 'jdbc:derby:mydb;create=true';
ij> autocommit off;
ij> create table t0(c1 int not null constraint p1 primary key);
0 rows inserted/updated/deleted
ij> alter table t0 add column c1 int;
ERROR X0Y32: Column 'C1' already exists in Table/View '"APP"."T0"'.
ij> alter table t0 add column c2 int not null default 0 primary key;
ERROR X0Y58: Attempt to add a primary key constraint to table '"APP"."T0"' failed because the table already has a constr
aint of that type. A table can only have a single primary key constraint.
ij> alter table t0 add column c2 int not null default 0;
ERROR XSCH5: In a base table there was a mismatch between the requested column number 1 and the maximum number of column
s 2.
ij> drop table t0;
Here in normal situation this must be passed or this must create the not null column c2 which has a default value of '0'.
ij> connect 'jdbc:derby:mydb;create=true';
ij> autocommit off;
ij> create table t0(c1 int not null constraint p1 primary key);
0 rows inserted/updated/deleted
ij> alter table t0 add column c1 int;
ERROR X0Y32: Column 'C1' already exists in Table/View '"APP"."T0"'.
ij> alter table t0 add column c2 int not null default 0 primary key;
ERROR X0Y58: Attempt to add a primary key constraint to table '"APP"."T0"' failed because the table already has a constr
aint of that type. A table can only have a single primary key constraint.
ij> alter table t0 add column c2 int not null default 0;
ERROR XSCH5: In a base table there was a mismatch between the requested column number 1 and the maximum number of column
s 2.
ij> drop table t0;
Here in normal situation this must be passed or this must create the not null column c2 which has a default value of '0'.

No comments:
Post a Comment