Subject Re: alter table syntax
Author skotaylor
--- In firebird-support@yahoogroups.com, "Martijn Tonies"
<m.tonies@u...> wrote:
> Hi,
>
> > I'm want to alter a column from 'NOT NULL' to 'NULL', it doesn't need
> > to be 'NOT NULL' it's not part of any constraints.
>
> well, it's pretty clear - you cannot do this. :-)

About as clear as mud.

> In order to do that, you need to drop a constraint and set the
> RDB$NULL_FLAG column.

Thanks, there is is.

First have to close all connections to the database, then:

update RDB$Relation_Fields set RDB$Null_Flag = null
where RDB$Field_Name = 'NAME'
and RDB$Relation_Name = 'STMENU'

That seems to have worked fine.

Thanks for the hint.

> An easier way is to download yourself a trial of Database Workbench
> ( www.upscene.com ) - start the Table Editor and uncheck the "not
> null" box, then press "Save".

Nice, and I'm lazy, but not that lazy. I like to know how to do
things. ;)

> With regards,

Cheers.

Scott.