Subject Re: [IBDI] Re: DEFAULT Values
Author Jason Wharton
Perhaps you are confused about how it works. DEFAULT isn't applied unless
the column is actually omitted from the INSERT statements list of columns.
If the column is included and it is given a value of NULL, then that is what
goes to the database.

PS. This isn't a technical support forum. Please continue this discussion on
the IB-Support list here at Yahoo.

HTH,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: "Dmitry Yemanov" <dimitr@...>
To: <IBDI@yahoogroups.com>
Sent: Saturday, February 24, 2001 8:58 AM
Subject: RE: [IBDI] Re: DEFAULT Values


> Hi Helen,
>
> > Well, I don't see how changing the default would give the engine any
clue
> > as to what to do about existing values in the column. How would it know
> > which rows which = the old default value were populated from the
> > constraint and which were actual data?
> >
> > DEFAULT works only on inserts...
>
> Maybe I wasn't clear enough. I was talking about inserts only. Existing
> values should be kept as they are. I meant how I can change the DEFAULT
> value to force the engine to use it in all subsequent inserts instead of
the
> old one. It is not allowed in IB by using ALTER TABLE ALTER COLUMN
> statement. ALTER DOMAIN statement modifies RDB$FIELDS only and doesn't
touch
> RDB$RELATION_FIELDS, so I cannot use it for this purpose either.
>
> The reason I'm asking this question is that the SQL92 spec defines a way
to
> set/drop DEFAULT value for any column.
>
> Cheers,
> Dmitry
>
>
> Community email addresses:
> Post message: IBDI@onelist.com
> Subscribe: IBDI-subscribe@onelist.com
> Unsubscribe: IBDI-unsubscribe@onelist.com
> List owner: IBDI-owner@onelist.com
>
> Shortcut URL to this page:
> http://www.onelist.com/community/IBDI
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>