Derby postpones checking values in DEFAULT clauses to DML time, cf this example:
create table t(c varchar(2) default 'foo')
insert into t values default
According to the standard , an error should result at create table time. Derby throws an error only at insert time above. Similarly for other types. Cf also discussion in
Cf also comments in ColumnDefinitionNode#defaultTypeIsValid:
"We'll check this at insertion time; see Beetle 5585 regarding the
need to move that check to here instead of waiting until insert
We should implement correct type checking of the DEFAULT values given at DDL time.