Subject Re: [firebird-support] Re: Change column type NULL to NOT NULL
Author Martijn Tonies
Hi,

> > I'm having an SQL <alt_col_clause> crisis. Trying to follow the
> > SQLRef for ALTER TABLE and can't seem to quite get the right syntax.
> > I want to convert a NULL field to be NOT NULL.
>
> This opertion can't be made using ALTER TABLE. Why - I don't know.
> Popular interactive tools allow this making updates of system tables.
> I'm sure about IBExpert, seems IBWorkBench allow this too. Beware - if

Yes, Database Workbench (as its called these days) lets you alter
such an attribute as well.

> columns really conatins nulls, gbk of this database will be
> unrestorable after this, perhaps this is the reason why such alter is
> not performed by standard DDL statement. So at least
> update table set column=something where column is null

Database Workbench will ask you for a value to enter in the column
when modifying a column from NULLable to NOT NULL :-)

With regards,

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