>> What value must it have? Add a default clause to this statement. Or add 
> > the field as nullable, populate with data and then alter to NOT NULL.
> 
> I have tried to add field as nullable, then tried to alter to not null.
> 
> UPDATE TMP_RPT SET ID1 = '5'; Commit;
> (This statement is OK)
> 
> 
> UPDATE RDB$RELATION_FIELDS SET RDB$NULL_FLAG = 1
> WHERE RDB$FIELD_NAME = 'ID1' AND RDB$RELATION_NAME = 'TMP_RPT';
> (This statement raised an error, FB 3.0 doesn't allow SysDBA user to change
> System table)

Firebird 3 rejects direct system tables modification.

Use the supported ALTER DDL statement for managing NULLability of existing 
columns/domains.

ALTER TABLE <table name> ALTER <field name> { DROP | SET } [NOT] NULL


See Firebird 3 release notes p.68.



--
With regards,
Thomas Steinmaurer
http://www.upscene.com

Professional Tools and Services for Firebird
FB TraceManager, IB LogManager, Database Health Check, Tuning etc.

Reply via email to