Subject Re: [ib-support] setting nullable column
Author Martijn Tonies
Hi,

> I found the following script
>
> UPDATE RDB$RELATION_FIELDS
> SET RDB$NULL_FLAG = 0
> WHERE RDB$RELATION_NAME = 'EMPLOYEE'
> AND RDB$FIELD_NAME = 'LAST_NAME';
>
>
> It seemd to run ok and when looking with IBAdmin, it shows that column
LAST_NAME is nullable.
> But when I try to insert some values FB still says "validation error,
column is null"?

First off all - the metadata is cached. For changes like these to take
effect, you need to re-connect.

Second, this isn't all there is to it! That's why I said DBWorkbench can
do this for you :)

Depending on HOW you created the NOT NULL column, it takes one
or two steps. The part you're trying to do is the one-step situation.

The second step is to drop a constraint via ALTER TABLE table DROP
CONSTRAINT constraint.

Lookup the name in RDB$RELATION_CONSTRAINTS.

Or, again - download DBWorkbench :)


With regards,

Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions
http://www.upscene.com

See you at the First European Firebird Conference in May in Fulda, Germany
http://www.firebird-conference.com