Subject | Re: [firebird-support] Record null on default '0' |
---|---|
Author | allies_xposs@yahoo.com |
Post date | 2011-05-24T13:19:23Z |
@martijn,
Yes, my structure with default '0',
But at my application command is:
' insert into default_test (id)
values (1);'
Not :
insert into default_test(id, deffed)
values (2, null);
But in data have null, but just 3% from all data.
Thanks
Regard
Allies xposs
Sent from my BlackBerry® smartphone from Sinyal Bagus XL, Nyambung Teruuusss...!
-----Original Message-----
From: "Martijn Tonies" <m.tonies@...>
Sender: firebird-support@yahoogroups.com
Date: Tue, 24 May 2011 14:48:01
To: <firebird-support@yahoogroups.com>
Reply-To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Record null on default '0'
Hi,
( 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!
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
Yes, my structure with default '0',
But at my application command is:
' insert into default_test (id)
values (1);'
Not :
insert into default_test(id, deffed)
values (2, null);
But in data have null, but just 3% from all data.
Thanks
Regard
Allies xposs
Sent from my BlackBerry® smartphone from Sinyal Bagus XL, Nyambung Teruuusss...!
-----Original Message-----
From: "Martijn Tonies" <m.tonies@...>
Sender: firebird-support@yahoogroups.com
Date: Tue, 24 May 2011 14:48:01
To: <firebird-support@yahoogroups.com>
Reply-To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Record null on default '0'
Hi,
> All dba firebird,create table default_test
>
> I have field varchar(1) default '0' on structure,
> But just 6 record have 'null' on 50000 record have '0'.
> Why..
( 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!
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links