Subject Re: [firebird-support] Record null on default '0'
Author Martijn Tonies
Hi,


> All dba firebird,
>
> I have field varchar(1) default '0' on structure,
> But just 6 record have 'null' on 50000 record have '0'.
> Why..

create table default_test
( id integer,
no_def varchar(1),
deffed varchar(1) default '0'
)

commit

insert into default_test (id)
values (1);

no value given for both columns, defaults are used: for the
column "no_def" this means NULL, for column deffed, this
means '0'.

insert into default_test(id, deffed)
values (2, null);

presto, NULL inserted into column "deffed".

With regards,

Martijn Tonies
Upscene Productions
http://www.upscene.com

Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!