Well, I’m a bit puzzeled here, yet it seems to be a really dumb question.
I’m trying to create a table that has a double column that is null by default. What i get is a table with a double column that is 0 by default, and I have no idea why.
The relevant part of the code:
CREATE_TABLE_STATEMENT = "create table " + TABLE_NAME + "
(id int not null generated always as identity constraint pk primary key,
parentid int default null, title varchar(50), minimum double default null,
maximum double default null, timeUnit double default null,
comment varchar(150) default null)";
And the corresponding “insert”:
"insert into " + TABLE_NAME + " " + "(parentid, title) values (1, 'first')"
Seems to work fine on my copy of Derby (see below).
What makes you think the default of null isn’t working properly?