Subject | Re: [firebird-support] Changing a default field value |
---|---|
Author | Helen Borrie |
Post date | 2003-08-19T02:56:44Z |
At 12:38 PM 19/08/2003 +1000, you wrote:
column of the right type with no constraints, copy the current data to it
(using an UPDATE statement), drop the original column, add it back again
with the new default value and copy the data back. Then drop the temp
column and you're there.
NB.
Update atable set tempcol = MyBooleanCol
where MyBooleanCol is not null
heLen
>I have a DB table field with DEFAULT = 'T'. I want to change the defaultYou don't have to pump the data into a new table. Just add a temporary
>value, but cannot using IBExpert or IBOConsole. Is there a way to do this
>without pumping all the data into a new (fixed) table and renaming it?
column of the right type with no constraints, copy the current data to it
(using an UPDATE statement), drop the original column, add it back again
with the new default value and copy the data back. Then drop the temp
column and you're there.
NB.
Update atable set tempcol = MyBooleanCol
where MyBooleanCol is not null
heLen