Subject Re: Adding a NOT NULL column to a table
Author Alexander V.Nevsky
--- In IBDI@y..., "Dmitry Yemanov" <dimitr_ex@y...> wrote:
> Hi,
> If a table is altered to add a column, values of this new column
become NULL
> for all rows already existing in a table. Even if this new column
has NOT
> NULL option, the result is still the same. And we have values that
> NOT NULL constraint. AFAIK, the only way to avoid this problem is to
> DEFAULT option for the new column which will be used to populate its
> Does anyone know what the SQL standard says about it? Should data
> inconsistent when DEFAULT option is not used?
> Cheers,
> Dmitry

Hi, Dmitry. For me, it's NICE feature. Often such a column should be
filled accordingly rather sophisticated conditions and to have not
filled NULL values is the only way to check result of filling - any
value can be a result of filling and we can't recognize non-filled
records if there will be default value.

Best regards.