On 5-6-2019 10:22, [email protected] [firebird-support] wrote:
> I build tables under IBEXPERT and define some fields with default value
> 
> FIELD_NAME INTEGER DEFAULT 0
> 
> I except 0 as value but has always NULL
> 
> Any idea ?
If you do `insert into yourtable (other_field, field_name) values 
('somevalue', null)` then the default will not be applied because you 
explicitly set the field to null.

A default will only be applied if you omit the field: `insert into 
yourtable (other_field) values ('somevalue')`. After this statement, 
`FIELD_NAME` will have value 0.

If that is not your use case, please show a reproducible example so we 
understand what you mean.

Mark
-- 
Mark Rotteveel

Reply via email to