Subject | Re: [ib-support] Default Question |
---|---|
Author | Helen Borrie |
Post date | 2001-02-08T07:48:06Z |
At 01:34 AM 08-02-01 -0500, you wrote:
only set if the insert doesn't specify something in the column. Passing
NULL in the insert statement will cause the column to be NULL. If you
exclude the column from the Values() list in the insert, you will get the
default.
If you need the column to go to zero whenever it gets set null, you'll need
a BU trigger to do that.
HB
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________
>Hi:On an update, it will go NULL. Defaults only apply to inserts and they are
>
> I have an edit control linked to VARCHAR(10) field and that field
> contains a value,
>say '428'.
>The field has a DEFAULT of '0'. On the form, I put dataset in Edit and I
>clear the
>entry then Post:
>
>DEFAULT Specifies a default value for column data; this value is entered
>when no other
>entry is made;
>
>Will IB consider "no other entry is made" and insert the DEFAULT '0' or
>will it go
>NULL?
only set if the insert doesn't specify something in the column. Passing
NULL in the insert statement will cause the column to be NULL. If you
exclude the column from the Values() list in the insert, you will get the
default.
If you need the column to go to zero whenever it gets set null, you'll need
a BU trigger to do that.
HB
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________