db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendle...@amberpoint.com>
Subject Re: Q: alter table to set default column values..
Date Wed, 17 Oct 2007 15:16:26 GMT
> The following error message is obtained:
> 
> ALTER TABLE  T_RES_FILESYSTEM ALTER COLUMN GROUP_ID DEFAULT -1
> org.apache.derby.client.am.SqlException: Syntax error: Encountered
> "DEFAULT" at line 1, column 53.

ALTER COLUMN DEFAULT was added in Derby 10.2.2.0. Are you using
Derby 10.2.2.0 or higher?

With the current trunk, it seems to be working fine for me:

ij version 10.4
ij> connect 'jdbc:derby:brydb';
ij> create table t1 (a int, b int not null);
0 rows inserted/updated/deleted
ij> alter table t1 alter column b default -1;
0 rows inserted/updated/deleted

thanks,

bryan



Mime
View raw message