A default value is only set where there's no value supplied, and "no value" is not the same as NULL.
For single row inserts:
insert into table(a,b,NULL) will keep the NULL.
insert into table(a,b,) will set the default.
This is based on Standard SQL and should be the same for all RDBMSes.
For Insert/Selects you should use the DEFAULT function:
insert into target select a,b, DEFAULT(c) from source
Dieter
A default value is only set where there's no value supplied, and "no value" is not the same as NULL.
For single row inserts:
insert into table(a,b,NULL) will keep the NULL.
insert into table(a,b,) will set the default.
This is based on Standard SQL and should be the same for all RDBMSes.
For Insert/Selects you should use the DEFAULT function:
insert into target select a,b, DEFAULT(c) from source
Dieter