Subject Re: default value
Author Adam
--- In, "Ivan Prenosil"
<Ivan.Prenosil@...> wrote:
> For each field, application reads separately its value and null-flag.
> The null flag is read only when application asks for it.
> The default behavior (specified in xsqlda during prepare)
> is that null flag is not read for Not Null fields (the rule is a bit
> more complex), but there is no problem for application
> to ask null flag always.
> You can try FSQL tool from this site
> it will show null state correctly.
> There are other special values that ISQL will not show correctly
> (while FSQL will), e.g. try to select minus zero real value:
> Ivan

I agree. It sounds similar to 0 being reported in a result column of a
view on the right side of a left join where no match occurred (instead
of what should obviously have been null).

The field is flagged as not null but there are null flag is set.

To add a not null field to a Firebird database with existing data,

Alter table add field ..... not null
update table set field = [something] where field is null;