If however the column contains data then the SELECT MAX... returns a
string value.
Hi Tim,
I think you've pinpointed this one, and I think it's definitely a bug.
Can you file it in Jira so we can get it fixed? Here's a simple script:
-bash-2.05b$ java org.apache.derby.tools.ij
ij version 10.3
ij> connect 'jdbc:derby:brydb';
ij> create table t (a varchar(10));
0 rows inserted/updated/deleted
ij> alter table t alter column a default 'my val';
0 rows inserted/updated/deleted
ij> insert into t (a) values ('hi');
1 row inserted/updated/deleted
ij> alter table t alter column a default 'another val';
ERROR 22018: Invalid character string format for type long.
thanks,
bryan