Subject Re: correct alter column syntax?
Author Alexander V.Nevsky
--- In firebird-support@yahoogroups.com, "retheoff" <misc@1...> wrote:
> Hi all, sorry if this is such a newbie question but I have read
> through the documentation and I just dont get it. I am in the
> process of learning Firebird, and I want to move away from MSSQL. :)
>
> I need to alter a column with a new default. Here is what I am
> doing right now:
>
> alter table CUSTOMERROOT
> alter DATECREATED TYPE TIMESTAMP DEFAULT CURRENT_TIMESTAMP;
>
> I get an error about invalid token: DEFAULT.
>
> So what is the correct synatax to alter a columns default?

Greg, using alter column you can't

a) change/set/drop default
b) change nullable/not null
c) change type to incompatible one

Some modern interactive tools can make it for you directly updating
system tables, but in some cases this can lead to data corruption.
Main FB site with technical information in English is
www.ibphoenix.com .

Best regards,
Alexander