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: changing the default value for a column
Date Sun, 17 Jun 2007 00:39:41 GMT
Amir Michail wrote:
> The column in question has type timestamp yet this doesn't work:
> ij> alter table <tablename> alter column <columnname> default 
> current_timestamp;
> ERROR 22005: An attempt was made to get a data value of type 'long'
> from a data value of type 'TIMESTAMP'.
> The table does not have any rows.

Hi Amir,

I tried a trivial example, but I could not reproduce this:

-bash-2.05b$ java org.apache.derby.tools.ij
ij version 10.4
ij> connect 'jdbc:derby:brydb;create=true';
ij> create table t (c1 timestamp);
0 rows inserted/updated/deleted
ij> alter table t alter column c1 default current_timestamp;
0 rows inserted/updated/deleted

Can you see if you can construct a script which reproduces the
problem in your environment, and let us know what that script is?



View raw message