Subject | Re: [Firebird-Architect] Extended field/domain DEFAULT usage |
---|---|
Author | Jim Starkey |
Post date | 2006-01-05T19:36:02Z |
Alexandre Benson Smith wrote:
by the standard, and even then, not much.
If someone wants to add a not null field to a populated table, the order
of battle should be:
1. Add the field without NOT NULL
2. Update all records in the table assigning appropriate values to
the new field.
3. Alter the field to be NOT NULL
Performing ESP is almost never the solution. It is simpler all around
to make the guy handle the problem himself. In almost all cases, it is
nothing more than a single mass UPDATE statement.
--
Jim Starkey
Netfrastructure, Inc.
978 526-1376
>Or requiring that when inserting a not null field to a populated tableI really don't like this kind of eroteric hocus pocus unless sanctioned
>it should have a default value, and that default value should be applied
>to the field.
>
>
>
>
by the standard, and even then, not much.
If someone wants to add a not null field to a populated table, the order
of battle should be:
1. Add the field without NOT NULL
2. Update all records in the table assigning appropriate values to
the new field.
3. Alter the field to be NOT NULL
Performing ESP is almost never the solution. It is simpler all around
to make the guy handle the problem himself. In almost all cases, it is
nothing more than a single mass UPDATE statement.
--
Jim Starkey
Netfrastructure, Inc.
978 526-1376