Subject Re: [firebird-support] Modifying/adding a column default?
Author Martijn Tonies
Hi Avi,

> I am trying to add a default value to an existing column. Is it
> possible to do it in FB 1.5.1 or do I have to create a new column, copy
> the values from the old column to the new one, drop the old column and
> then rename the new one? This can be a major pain if an index
> references this column, for example.

To add a default, I think there are 4 ways --

1) create a domain with a default, use the domain instead of a plain
datatype

2) add the default to the system generated domain (only if you're using a
raw datatype)

3) create a new field/domain and copy the default BLR to the existing
field.

4) download Database Workbench and let the GUI do (3) when you enter
a new default in the Table Editor :-)

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com